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
2cb6483a
Commit
2cb6483a
authored
Feb 07, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_configurator: Extra assertions and update tests names.
This helps to figure out what it is really testing.
parent
4489e56f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
master/bt5/slapos_configurator/TestTemplateItem/portal_components/test.erp5.testSlapOSConfigurator.py
...tem/portal_components/test.erp5.testSlapOSConfigurator.py
+26
-7
No files found.
master/bt5/slapos_configurator/TestTemplateItem/portal_components/test.erp5.testSlapOSConfigurator.py
View file @
2cb6483a
...
@@ -43,7 +43,8 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
...
@@ -43,7 +43,8 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
def
testConfiguredShacacheWebSite
(
self
):
def
testConfiguredShacacheWebSite
(
self
):
""" Make sure Shacache WebSite is setuped by Alarm
""" Make sure Shacache WebSite is setuped by Alarm
case we trust on promise outcome."""
case we trust on promise outcome, this checks:
WebSiteModule_checkShacacheConstraint """
self
.
assertEqual
(
self
.
portal
.
web_site_module
.
checkConsistency
(),
[])
self
.
assertEqual
(
self
.
portal
.
web_site_module
.
checkConsistency
(),
[])
def
testConfiguredCacheViaConstraint
(
self
):
def
testConfiguredCacheViaConstraint
(
self
):
...
@@ -54,7 +55,13 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
...
@@ -54,7 +55,13 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
def
testConfiguredConversionServerViaConstraint
(
self
):
def
testConfiguredConversionServerViaConstraint
(
self
):
""" Make sure Conversion Server was configured well,
""" Make sure Conversion Server was configured well,
invoking checkConsistency """
invoking checkConsistency """
self
.
assertEqual
(
self
.
portal
.
portal_preferences
.
checkConsistency
(),
[])
pref_tool
=
self
.
portal
.
portal_preferences
self
.
assertEqual
(
pref_tool
.
checkConsistency
(),
[])
# Check if configuration is properly set:
self
.
assertEqual
(
pref_tool
.
slapos_default_system_preference
.
SystemPreference_checkSystemPreferenceConsistency
(),
[])
def
testConfiguredCertificateAuthoringConstraint
(
self
):
def
testConfiguredCertificateAuthoringConstraint
(
self
):
"""Make sure Certificate Authoring was configured well,
"""Make sure Certificate Authoring was configured well,
...
@@ -81,9 +88,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
...
@@ -81,9 +88,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
self
.
assertEqual
([],
self
.
assertEqual
([],
self
.
portal
.
portal_templates
.
TemplateTool_checkBusinessApplicationToModuleConsistency
())
self
.
portal
.
portal_templates
.
TemplateTool_checkBusinessApplicationToModuleConsistency
())
def
test
ConfiguredConversionServer
(
self
):
def
test
_SystemPreference_checkConversionServerConsistency
(
self
):
""" Make sure Conversion Server (Cloudooo) is
""" Make sure Conversion Server (Cloudooo) is
well configured
"""
well configured
.
"""
# set preference
# set preference
preference_tool
=
self
.
portal
.
portal_preferences
preference_tool
=
self
.
portal
.
portal_preferences
conversion_url
=
[
"https://cloudooo.erp5.net/"
]
conversion_url
=
[
"https://cloudooo.erp5.net/"
]
...
@@ -111,10 +118,19 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
...
@@ -111,10 +118,19 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
""" Make sure portal_alarms is subscribed. """
""" Make sure portal_alarms is subscribed. """
self
.
assertTrue
(
self
.
portal
.
portal_alarms
.
isSubscribed
())
self
.
assertTrue
(
self
.
portal
.
portal_alarms
.
isSubscribed
())
def
test_TemplateTool_checkSlapOSPASConsistency
(
self
):
""" Ensure that PAS is configured after the configuration """
self
.
assertEqual
(
self
.
portal
.
portal_templates
.
TemplateTool_checkSlapOSPASConsistency
(),
[])
self
.
assertEqual
(
self
.
portal
.
portal_templates
.
TemplateTool_checkSlapOSPASConsistency
(),
[])
def
testInteractionDropped
(
self
):
def
testInteractionDropped
(
self
):
""" Make sure that no portal type uses interaction workflow for simulation """
""" Make sure that no portal type uses interaction workflow for simulation """
for
pt
in
self
.
portal
.
portal_types
.
objectValues
():
for
pt
in
self
.
portal
.
portal_types
.
objectValues
():
for
dropped_workflow
in
[
"delivery_movement_simulation_interaction_workflow"
,
for
dropped_workflow
in
[
"delivery_movement_simulation_interaction_workflow"
,
"delivery_simulation_interaction_workflow"
,
"delivery_simulation_interaction_workflow"
,
"open_order_simulation_interaction_workflow"
,
"open_order_simulation_interaction_workflow"
,
"open_order_path_simulation_interaction_workflow"
,
"open_order_path_simulation_interaction_workflow"
,
...
@@ -126,7 +142,7 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
...
@@ -126,7 +142,7 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
"Workflow %s still present on %s Portal Type (%s)"
%
\
"Workflow %s still present on %s Portal Type (%s)"
%
\
(
dropped_workflow
,
pt
,
pt
.
getTypeWorkflowList
()))
(
dropped_workflow
,
pt
,
pt
.
getTypeWorkflowList
()))
def
test
ModuleHasIdGeneratorByDa
y
(
self
):
def
test
_Module_checkSlapOSModuleIdGeneratorConsistenc
y
(
self
):
""" Ensure the Constraint sets appropriate id generator on all modules.
""" Ensure the Constraint sets appropriate id generator on all modules.
"""
"""
module_list
=
[
module
.
getId
()
for
module
in
self
.
portal
.
objectValues
()
module_list
=
[
module
.
getId
()
for
module
in
self
.
portal
.
objectValues
()
...
@@ -260,6 +276,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
...
@@ -260,6 +276,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
self
.
assertSameSet
(
module_list
,
expected_module_list
)
self
.
assertSameSet
(
module_list
,
expected_module_list
)
self
.
assertEqual
(
self
.
portal
.
portal_simulation
.
getIdGenerator
(),
"_generatePerDayId"
)
self
.
assertEqual
(
self
.
portal
.
portal_activities
.
getIdGenerator
(),
"_generatePerDayId"
)
def
testConfiguredBusinessTemplateList
(
self
):
def
testConfiguredBusinessTemplateList
(
self
):
""" Make sure Installed business Templates are
""" Make sure Installed business Templates are
what it is expected. """
what it is expected. """
...
...
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