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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
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
Hide 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):
def
testConfiguredShacacheWebSite
(
self
):
""" 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
(),
[])
def
testConfiguredCacheViaConstraint
(
self
):
...
...
@@ -54,7 +55,13 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
def
testConfiguredConversionServerViaConstraint
(
self
):
""" Make sure Conversion Server was configured well,
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
):
"""Make sure Certificate Authoring was configured well,
...
...
@@ -81,9 +88,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
self
.
assertEqual
([],
self
.
portal
.
portal_templates
.
TemplateTool_checkBusinessApplicationToModuleConsistency
())
def
test
ConfiguredConversionServer
(
self
):
def
test
_SystemPreference_checkConversionServerConsistency
(
self
):
""" Make sure Conversion Server (Cloudooo) is
well configured
"""
well configured
.
"""
# set preference
preference_tool
=
self
.
portal
.
portal_preferences
conversion_url
=
[
"https://cloudooo.erp5.net/"
]
...
...
@@ -111,10 +118,19 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
""" Make sure portal_alarms is subscribed. """
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
):
""" Make sure that no portal type uses interaction workflow for simulation """
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"
,
"open_order_simulation_interaction_workflow"
,
"open_order_path_simulation_interaction_workflow"
,
...
...
@@ -126,7 +142,7 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
"Workflow %s still present on %s Portal Type (%s)"
%
\
(
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.
"""
module_list
=
[
module
.
getId
()
for
module
in
self
.
portal
.
objectValues
()
...
...
@@ -260,6 +276,9 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
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
):
""" Make sure Installed business Templates are
what it is expected. """
...
...
@@ -288,4 +307,4 @@ class TestSlapOSConfigurator(SlapOSTestCaseMixin):
bt5_list
=
[
i
[
1
]
for
i
in
self
.
portal
.
portal_templates
.
resolveBusinessTemplateListDependency
(
template_title_list
=
bt5_to_resolve
,
with_test_dependency_list
=
True
)]
self
.
assertSameSet
(
expected_business_template_list
,
bt5_list
)
self
.
assertSameSet
(
expected_business_template_list
,
bt5_list
)
\ No newline at end of file
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