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
b6ef63ce
Commit
b6ef63ce
authored
Jan 19, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: root shared instance can not be upgraded by Allocation Supply on the same tree
parent
13e98d27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
...ents/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
+28
-2
No files found.
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins.py
View file @
b6ef63ce
...
@@ -37,7 +37,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -37,7 +37,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
)
)
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
bootstrapAllocableInstanceTree
(
self
,
is_allocated
=
False
):
def
bootstrapAllocableInstanceTree
(
self
,
is_allocated
=
False
,
shared
=
False
):
project
=
self
.
addProject
()
project
=
self
.
addProject
()
person
=
self
.
_makePerson
(
project
)
person
=
self
.
_makePerson
(
project
)
software_product
=
self
.
_makeSoftwareProduct
(
project
)
software_product
=
self
.
_makeSoftwareProduct
(
project
)
...
@@ -59,7 +59,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -59,7 +59,7 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
software_type
=
type_variation
.
getTitle
(),
software_type
=
type_variation
.
getTitle
(),
instance_xml
=
self
.
generateSafeXml
(),
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
shared
=
shared
,
software_title
=
'test tree'
,
software_title
=
'test tree'
,
state
=
'started'
,
state
=
'started'
,
project_reference
=
project
.
getReference
()
project_reference
=
project
.
getReference
()
...
@@ -203,3 +203,29 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
...
@@ -203,3 +203,29 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
##########################################################################
# Slave allocated on Compute Node
##########################################################################
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNodeButNotTree
(
self
):
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
new_release_variation
,
type_variation
)
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
def
test_createUpgradeDecision_slaveAllocatedOnComputeNodeSameTree_newReleaseOnComputeNode
(
self
):
# A Slave Instance can not be the root instance and allocated on the same tree
# at the same time
software_product
,
_
,
type_variation
,
compute_node
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
is_allocated
=
True
,
shared
=
True
)
new_release_variation
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
addAllocationSupply
(
"for compute node"
,
compute_node
,
software_product
,
new_release_variation
,
type_variation
,
is_slave_on_same_instance_tree_allocable
=
True
)
self
.
tic
()
self
.
assertEqual
(
None
,
instance_tree
.
InstanceTree_createUpgradeDecision
())
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