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
...
@@ -28,11 +28,6 @@ import os
class
TestSlapOSConfigurator
(
SlapOSTestCaseMixin
):
class
TestSlapOSConfigurator
(
SlapOSTestCaseMixin
):
maxDiff
=
None
maxDiff
=
None
def
bootstrapSite
(
self
):
SlapOSTestCaseMixin
.
bootstrapSite
(
self
)
self
.
getBusinessConfiguration
().
BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList
()
self
.
tic
()
def
testConfiguredModuleGeneratorIDViaConstraint
(
self
):
def
testConfiguredModuleGeneratorIDViaConstraint
(
self
):
""" Make sure Generator ID is well configured, in this
""" Make sure Generator ID is well configured, in this
case we trust on promise outcome."""
case we trust on promise outcome."""
...
...
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
96b763ff
...
@@ -160,17 +160,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -160,17 +160,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
self
.
commit
()
self
.
commit
()
self
.
launchConfigurator
()
self
.
launchConfigurator
()
def
afterSetUp
(
self
):
def
updateInitSite
(
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
()
self
.
portal
.
portal_caches
.
updateCache
()
self
.
portal
.
portal_caches
.
updateCache
()
try
:
try
:
...
@@ -182,13 +172,20 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -182,13 +172,20 @@ class testSlapOSMixin(ERP5TypeTestCase):
initsite
[
"cloudooo_url"
]
=
"https://cloudooo.erp5.net"
initsite
[
"cloudooo_url"
]
=
"https://cloudooo.erp5.net"
config
.
product_config
[
"initsite"
]
=
initsite
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
()
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
.
commit
()
self
.
updateInitSite
()
def
deSetUpPersistentDummyMailHost
(
self
):
def
deSetUpPersistentDummyMailHost
(
self
):
if
'MailHost'
in
self
.
portal
.
objectIds
():
if
'MailHost'
in
self
.
portal
.
objectIds
():
...
@@ -209,8 +206,9 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -209,8 +206,9 @@ class testSlapOSMixin(ERP5TypeTestCase):
"slapos_master_configuration_workflow"
]
"slapos_master_configuration_workflow"
]
def
launchConfigurator
(
self
):
def
launchConfigurator
(
self
):
self
.
logMessage
(
'SlapOS launchConfigurator'
)
self
.
logMessage
(
'SlapOS launchConfigurator
...
\
n
'
)
self
.
login
()
self
.
login
()
self
.
updateInitSite
()
# Create new Configuration
# Create new Configuration
business_configuration
=
self
.
getBusinessConfiguration
()
business_configuration
=
self
.
getBusinessConfiguration
()
...
@@ -226,13 +224,13 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -226,13 +224,13 @@ class testSlapOSMixin(ERP5TypeTestCase):
self
.
portal
.
portal_types
.
resetDynamicDocumentsOnceAtTransactionBoundary
()
self
.
portal
.
portal_types
.
resetDynamicDocumentsOnceAtTransactionBoundary
()
self
.
tic
(
verbose
=
True
,
delay
=
3600
)
self
.
tic
(
verbose
=
True
,
delay
=
3600
)
def
bootstrapSite
(
self
):
# Set post upgrade configurations for the tests
self
.
logMessage
(
'SlapOS bootstrapSite'
)
preference_tool
=
self
.
portal
.
portal_preferences
.
portal_preferences
self
.
getDefaultSystemPreference
()
.
setPreferredHateoasUrl
(
"http://dummy/"
)
preference_tool
.
slapos_default_system_preference
.
setPreferredHateoasUrl
(
"http://dummy/"
)
self
.
getDefaultSystemPreference
()
.
setPreferredAuthenticationPolicyEnabled
(
True
)
preference_tool
.
slapos_default_system_preference
.
setPreferredAuthenticationPolicyEnabled
(
True
)
self
.
clearCache
()
self
.
tic
()
self
.
tic
()
self
.
clearCache
()
def
getExpectedBusinessTemplateInstalledAfterConfiguration
(
self
):
def
getExpectedBusinessTemplateInstalledAfterConfiguration
(
self
):
return
[
'erp5_core'
,
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