Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
96b763ff
Commit
96b763ff
authored
Apr 20, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Drop boostrapSite
Just let configuratior handle everything
parent
6e88f401
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
27 deletions
+20
-27
master/bt5/slapos_configurator/TestTemplateItem/portal_components/test.erp5.testSlapOSConfigurator.py
...tem/portal_components/test.erp5.testSlapOSConfigurator.py
+0
-5
master/product/SlapOS/tests/testSlapOSMixin.py
master/product/SlapOS/tests/testSlapOSMixin.py
+20
-22
No files found.
master/bt5/slapos_configurator/TestTemplateItem/portal_components/test.erp5.testSlapOSConfigurator.py
View file @
96b763ff
...
...
@@ -28,11 +28,6 @@ import os
class
TestSlapOSConfigurator
(
SlapOSTestCaseMixin
):
maxDiff
=
None
def
bootstrapSite
(
self
):
SlapOSTestCaseMixin
.
bootstrapSite
(
self
)
self
.
getBusinessConfiguration
().
BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList
()
self
.
tic
()
def
testConfiguredModuleGeneratorIDViaConstraint
(
self
):
""" Make sure Generator ID is well configured, in this
case we trust on promise outcome."""
...
...
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
96b763ff
...
...
@@ -160,17 +160,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
self
.
commit
()
self
.
launchConfigurator
()
def
afterSetUp
(
self
):
self
.
login
()
self
.
createAlarmStep
()
if
self
.
isLiveTest
():
self
.
setUpPersistentDummyMailHost
()
return
self
.
portal
.
portal_caches
.
erp5_site_global_id
=
'%s'
%
random
.
random
()
self
.
portal
.
portal_caches
.
_p_changed
=
1
self
.
createCertificateAuthorityFile
()
self
.
commit
()
def
updateInitSite
(
self
):
self
.
portal
.
portal_caches
.
updateCache
()
try
:
...
...
@@ -182,13 +172,20 @@ class testSlapOSMixin(ERP5TypeTestCase):
initsite
[
"cloudooo_url"
]
=
"https://cloudooo.erp5.net"
config
.
product_config
[
"initsite"
]
=
initsite
self
.
commit
()
def
afterSetUp
(
self
):
self
.
login
()
self
.
createAlarmStep
()
if
self
.
isLiveTest
():
self
.
setUpPersistentDummyMailHost
()
return
self
.
portal
.
portal_caches
.
erp5_site_global_id
=
'%s'
%
random
.
random
()
self
.
portal
.
portal_caches
.
_p_changed
=
1
self
.
createCertificateAuthorityFile
()
if
not
getattr
(
self
.
portal
,
'is_site_bootstrapped'
,
0
):
self
.
portal
.
is_site_bootstrapped
=
1
self
.
bootstrapSite
()
self
.
portal
.
_p_changed
=
1
self
.
commit
()
self
.
updateInitSite
()
def
deSetUpPersistentDummyMailHost
(
self
):
if
'MailHost'
in
self
.
portal
.
objectIds
():
...
...
@@ -209,8 +206,9 @@ class testSlapOSMixin(ERP5TypeTestCase):
"slapos_master_configuration_workflow"
]
def
launchConfigurator
(
self
):
self
.
logMessage
(
'SlapOS launchConfigurator'
)
self
.
logMessage
(
'SlapOS launchConfigurator
...
\
n
'
)
self
.
login
()
self
.
updateInitSite
()
# Create new Configuration
business_configuration
=
self
.
getBusinessConfiguration
()
...
...
@@ -226,13 +224,13 @@ class testSlapOSMixin(ERP5TypeTestCase):
self
.
portal
.
portal_types
.
resetDynamicDocumentsOnceAtTransactionBoundary
()
self
.
tic
(
verbose
=
True
,
delay
=
3600
)
def
bootstrapSite
(
self
):
self
.
logMessage
(
'SlapOS bootstrapSite'
)
self
.
getDefaultSystemPreference
()
.
setPreferredHateoasUrl
(
"http://dummy/"
)
self
.
getDefaultSystemPreference
()
.
setPreferredAuthenticationPolicyEnabled
(
True
)
# Set post upgrade configurations for the tests
preference_tool
=
self
.
portal
.
portal_preferences
.
portal_preferences
preference_tool
.
slapos_default_system_preference
.
setPreferredHateoasUrl
(
"http://dummy/"
)
preference_tool
.
slapos_default_system_preference
.
setPreferredAuthenticationPolicyEnabled
(
True
)
self
.
clearCache
()
self
.
tic
()
self
.
clearCache
()
def
getExpectedBusinessTemplateInstalledAfterConfiguration
(
self
):
return
[
'erp5_core'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment