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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
3d7b76cf
Commit
3d7b76cf
authored
Jan 18, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: mark test to check
parent
5ceea286
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
80 deletions
+80
-80
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSPDMAlarm.py
+5
-5
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
...ents/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
+10
-10
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm.py
...oySoftwareInstallationWithArchivedSoftwareReleaseAlarm.py
+4
-4
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
+61
-61
No files found.
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMAlarm.py
View file @
3d7b76cf
...
@@ -47,7 +47,7 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
...
@@ -47,7 +47,7 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
return
instance_tree
return
instance_tree
def
test_alarm_upgrade_decision_process_instance_tree
(
self
):
def
test_
tocheck_
alarm_upgrade_decision_process_instance_tree
(
self
):
upgrade_decision
=
self
.
_makeUpgradeDecision
()
upgrade_decision
=
self
.
_makeUpgradeDecision
()
upgrade_decision
.
start
()
upgrade_decision
.
start
()
self
.
tic
()
self
.
tic
()
...
@@ -56,7 +56,7 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
...
@@ -56,7 +56,7 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
upgrade_decision
,
upgrade_decision
,
'UpgradeDecision_processUpgrade'
)
'UpgradeDecision_processUpgrade'
)
def
test_alarm_upgrade_decision_process_planned
(
self
):
def
test_
tocheck_
alarm_upgrade_decision_process_planned
(
self
):
upgrade_decision
=
self
.
_makeUpgradeDecision
(
confirm
=
0
)
upgrade_decision
=
self
.
_makeUpgradeDecision
(
confirm
=
0
)
upgrade_decision
.
plan
()
upgrade_decision
.
plan
()
self
.
_test_alarm
(
self
.
_test_alarm
(
...
@@ -64,7 +64,7 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
...
@@ -64,7 +64,7 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
upgrade_decision
,
upgrade_decision
,
'UpgradeDecision_notify'
)
'UpgradeDecision_notify'
)
def
test_alarm_upgrade_decision_process_stopped
(
self
):
def
test_
tocheck_
alarm_upgrade_decision_process_stopped
(
self
):
upgrade_decision
=
self
.
_makeUpgradeDecision
()
upgrade_decision
=
self
.
_makeUpgradeDecision
()
upgrade_decision
.
start
()
upgrade_decision
.
start
()
upgrade_decision
.
stop
()
upgrade_decision
.
stop
()
...
@@ -119,14 +119,14 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
...
@@ -119,14 +119,14 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
self
.
_test_alarm_compute_node_create_upgrade_decision_not_visited
(
'close/termination'
,
'never'
)
self
.
_test_alarm_compute_node_create_upgrade_decision_not_visited
(
'close/termination'
,
'never'
)
self
.
_test_alarm_compute_node_create_upgrade_decision_not_visited
(
'close/noallocation'
,
'never'
)
self
.
_test_alarm_compute_node_create_upgrade_decision_not_visited
(
'close/noallocation'
,
'never'
)
def
test_alarm_instance_tree_create_upgrade_decision
(
self
):
def
test_
tocheck_
alarm_instance_tree_create_upgrade_decision
(
self
):
instance_tree
=
self
.
_makeInstanceTree
()
instance_tree
=
self
.
_makeInstanceTree
()
self
.
_test_alarm
(
self
.
_test_alarm
(
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
,
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
,
instance_tree
,
instance_tree
,
'InstanceTree_createUpgradeDecision'
)
'InstanceTree_createUpgradeDecision'
)
def
test_alarm_create_upgrade_decision_destroyed_instance_tree
(
self
):
def
test_
tocheck_
alarm_create_upgrade_decision_destroyed_instance_tree
(
self
):
instance_tree
=
self
.
_makeInstanceTree
(
slap_state
=
"destroy_requested"
)
instance_tree
=
self
.
_makeInstanceTree
(
slap_state
=
"destroy_requested"
)
self
.
_test_alarm_not_visited
(
self
.
_test_alarm_not_visited
(
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
,
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
,
...
...
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
View file @
3d7b76cf
...
@@ -111,7 +111,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -111,7 +111,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
self
.
partition
.
markBusy
()
self
.
partition
.
markBusy
()
self
.
tic
()
self
.
tic
()
def
test_InstanceTree_createUpgradeDecision_upgradeScopeConfirmation
(
self
):
def
test_
tocheck_
InstanceTree_createUpgradeDecision_upgradeScopeConfirmation
(
self
):
# check upgrade decision on HS
# check upgrade decision on HS
self
.
instance_tree
.
setUpgradeScope
(
'manual'
)
self
.
instance_tree
.
setUpgradeScope
(
'manual'
)
self
.
tic
()
self
.
tic
()
...
@@ -135,7 +135,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -135,7 +135,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
shared_upgrade_decision
=
self
.
shared_instance_tree
.
InstanceTree_createUpgradeDecision
()
shared_upgrade_decision
=
self
.
shared_instance_tree
.
InstanceTree_createUpgradeDecision
()
self
.
assertEqual
(
'started'
,
shared_upgrade_decision
.
getSimulationState
())
self
.
assertEqual
(
'started'
,
shared_upgrade_decision
.
getSimulationState
())
def
test_InstanceTree_createUpgradeDecision_upgradeScopeAuto
(
self
):
def
test_
tocheck_
InstanceTree_createUpgradeDecision_upgradeScopeAuto
(
self
):
# check upgrade decision on HS
# check upgrade decision on HS
self
.
instance_tree
.
setUpgradeScope
(
'auto'
)
self
.
instance_tree
.
setUpgradeScope
(
'auto'
)
self
.
tic
()
self
.
tic
()
...
@@ -157,7 +157,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -157,7 +157,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
shared_upgrade_decision
=
self
.
shared_instance_tree
.
InstanceTree_createUpgradeDecision
()
shared_upgrade_decision
=
self
.
shared_instance_tree
.
InstanceTree_createUpgradeDecision
()
self
.
assertEqual
(
'started'
,
shared_upgrade_decision
.
getSimulationState
())
self
.
assertEqual
(
'started'
,
shared_upgrade_decision
.
getSimulationState
())
def
test_InstanceTree_createUpgradeDecision_upgradeScopeDisabled
(
self
):
def
test_
tocheck_
InstanceTree_createUpgradeDecision_upgradeScopeDisabled
(
self
):
# check upgrade decision on HS
# check upgrade decision on HS
self
.
instance_tree
.
setUpgradeScope
(
'disabled'
)
self
.
instance_tree
.
setUpgradeScope
(
'disabled'
)
self
.
tic
()
self
.
tic
()
...
@@ -167,7 +167,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -167,7 +167,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
self
.
assertEqual
(
None
,
shared_upgrade_decision
)
self
.
assertEqual
(
None
,
shared_upgrade_decision
)
def
testInstanceTree_createUpgradeDecision_no_newer
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision_no_newer
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
#, owner=person)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
#, owner=person)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
@@ -196,7 +196,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -196,7 +196,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
upgrade_decision
=
instance_tree
.
InstanceTree_createUpgradeDecision
()
self
.
assertEqual
(
upgrade_decision
,
None
)
self
.
assertEqual
(
upgrade_decision
,
None
)
def
testInstanceTree_createUpgradeDecision_closed_compute_node
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision_closed_compute_node
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
,
allocation_scope
=
"close/outdated"
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
,
allocation_scope
=
"close/outdated"
)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
@@ -232,7 +232,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -232,7 +232,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
up_decision
.
UpgradeDecision_getAggregateValue
(
"Software Release"
).
\
up_decision
.
UpgradeDecision_getAggregateValue
(
"Software Release"
).
\
getUrlString
())
getUrlString
())
def
testInstanceTree_createUpgradeDecision_create_once_transaction
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision_create_once_transaction
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
,
allocation_scope
=
"open/personal"
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
,
allocation_scope
=
"open/personal"
)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
@@ -266,7 +266,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -266,7 +266,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
# no new Upgrade decision created
# no new Upgrade decision created
self
.
assertEqual
(
up_decision
,
None
)
self
.
assertEqual
(
up_decision
,
None
)
def
testInstanceTree_createUpgradeDecision
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
@@ -307,7 +307,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -307,7 +307,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
self
.
assertEqual
(
up_decision2
,
None
)
self
.
assertEqual
(
up_decision2
,
None
)
def
testInstanceTree_createUpgradeDecision_with_exist
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision_with_exist
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
@@ -347,7 +347,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -347,7 +347,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
self
.
assertEqual
(
release
.
getUrlString
(),
self
.
assertEqual
(
release
.
getUrlString
(),
software_release3
.
getUrlString
())
software_release3
.
getUrlString
())
def
testInstanceTree_createUpgradeDecision_rejected
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision_rejected
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
@@ -386,7 +386,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -386,7 +386,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
# No new upgrade decision created with software_release2
# No new upgrade decision created with software_release2
self
.
assertEqual
(
up_decision
,
None
)
self
.
assertEqual
(
up_decision
,
None
)
def
testInstanceTree_createUpgradeDecision_rejected_2
(
self
):
def
test
_tocheck
InstanceTree_createUpgradeDecision_rejected_2
(
self
):
person
=
self
.
_makePerson
(
self
.
project
)
person
=
self
.
_makePerson
(
self
.
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
#, owner=person)
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
project
)
#, owner=person)
self
.
_makeComputePartitions
(
compute_node
)
self
.
_makeComputePartitions
(
compute_node
)
...
...
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm.py
View file @
3d7b76cf
...
@@ -49,7 +49,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
...
@@ -49,7 +49,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
self
.
tic
()
self
.
tic
()
return
instance
return
instance
def
test
(
self
):
def
test
_tocheck
(
self
):
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
.
setPreferredCloudContractEnabled
(
True
)
preference
.
setPreferredCloudContractEnabled
(
True
)
self
.
tic
()
self
.
tic
()
...
@@ -135,7 +135,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
...
@@ -135,7 +135,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
self
.
assertEqual
(
'validated'
,
archived_used_software_installation
.
getValidationState
())
self
.
assertEqual
(
'validated'
,
archived_used_software_installation
.
getValidationState
())
self
.
assertEqual
(
'start_requested'
,
archived_used_software_installation
.
getSlapState
())
self
.
assertEqual
(
'start_requested'
,
archived_used_software_installation
.
getSlapState
())
def
test_manual_upgrade_scope
(
self
):
def
test_
tocheck_
manual_upgrade_scope
(
self
):
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
.
setPreferredCloudContractEnabled
(
True
)
preference
.
setPreferredCloudContractEnabled
(
True
)
self
.
tic
()
self
.
tic
()
...
@@ -214,7 +214,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
...
@@ -214,7 +214,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
self
.
assertEqual
(
'validated'
,
archived_used_software_installation
.
getValidationState
())
self
.
assertEqual
(
'validated'
,
archived_used_software_installation
.
getValidationState
())
@
simulateByEditWorkflowMark
(
'SoftwareRelease_findAndDestroySoftwareInstallation'
)
@
simulateByEditWorkflowMark
(
'SoftwareRelease_findAndDestroySoftwareInstallation'
)
def
test_no_op_run_software_release
(
self
):
def
test_
tocheck_
no_op_run_software_release
(
self
):
archived_software_release
=
self
.
portal
.
software_release_module
.
newContent
(
archived_software_release
=
self
.
portal
.
software_release_module
.
newContent
(
portal_type
=
'Software Release'
,
portal_type
=
'Software Release'
,
version
=
'1'
,
version
=
'1'
,
...
@@ -251,7 +251,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
...
@@ -251,7 +251,7 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
[
q
[
'comment'
]
for
q
in
archived_software_release
.
workflow_history
[
'edit_workflow'
]])
[
q
[
'comment'
]
for
q
in
archived_software_release
.
workflow_history
[
'edit_workflow'
]])
@
simulateByEditWorkflowMark
(
'SoftwareInstallation_destroyWithSoftwareReleaseArchived'
)
@
simulateByEditWorkflowMark
(
'SoftwareInstallation_destroyWithSoftwareReleaseArchived'
)
def
test_no_op_run_software_installation
(
self
):
def
test_
tocheck_
no_op_run_software_installation
(
self
):
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
=
self
.
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
.
setPreferredCloudContractEnabled
(
True
)
preference
.
setPreferredCloudContractEnabled
(
True
)
self
.
tic
()
self
.
tic
()
...
...
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
View file @
3d7b76cf
This diff is collapsed.
Click to expand it.
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