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
Titouan Soulard
slapos.core
Commits
3b48bdb8
Commit
3b48bdb8
authored
Jul 31, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: tests: prevent test to impact other tests
parent
27566ac4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudAlarm.py
...eItem/portal_components/test.erp5.testSlapOSCloudAlarm.py
+24
-16
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudAlarm.py
View file @
3b48bdb8
...
...
@@ -277,23 +277,31 @@ class TestSlapOSFreeComputePartitionAlarm(SlapOSTestCaseMixin):
self
.
tic
()
# Prevent calling interaction workflows
software_instance
.
setCategoryList
(
software_instance
.
getCategoryList
()
+
[
'aggregate/%s'
%
partition
.
getRelativeUrl
()]
try
:
# Prevent calling interaction workflows
software_instance
.
setCategoryList
(
software_instance
.
getCategoryList
()
+
[
'aggregate/%s'
%
partition
.
getRelativeUrl
()]
)
software_instance2
.
setCategoryList
(
software_instance2
.
getCategoryList
()
+
[
'aggregate/%s'
%
partition
.
getRelativeUrl
()]
)
software_instance2
.
setCategoryList
(
software_instance2
.
getCategoryList
()
+
[
'aggregate/%s'
%
partition
.
getRelativeUrl
()]
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
partition
,
'busy'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance
,
'destroy_requested'
)
self
.
tic
()
software_instance
.
SoftwareInstance_tryToUnallocatePartition
()
self
.
assertEqual
(
None
,
software_instance
.
getAggregate
())
self
.
assertEqual
(
'busy'
,
partition
.
getSlapState
())
self
.
assertEqual
(
partition
.
getRelativeUrl
(),
software_instance2
.
getAggregate
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
partition
,
'busy'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
software_instance
,
'destroy_requested'
)
self
.
tic
()
software_instance
.
SoftwareInstance_tryToUnallocatePartition
()
self
.
assertEqual
(
None
,
software_instance
.
getAggregate
())
self
.
assertEqual
(
'busy'
,
partition
.
getSlapState
())
self
.
assertEqual
(
partition
.
getRelativeUrl
(),
software_instance2
.
getAggregate
())
except
:
# 2 instances linked to a partition crashes _fillComputeNodeInformationCache
# activity. Clean up to not impact the other tests
software_instance2
.
setAggregate
(
None
)
raise
finally
:
software_instance2
.
setAggregate
(
None
)
def
test_SoftwareInstance_tryToUnallocatePartition_script_notDestroyed
(
self
):
instance_tree
=
self
.
addInstanceTree
()
...
...
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