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
146f9fa9
Commit
146f9fa9
authored
Jan 18, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: remote tests from dropped scripts
parent
60cc2a52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
86 deletions
+1
-86
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
+1
-86
No files found.
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
View file @
146f9fa9
...
@@ -181,6 +181,7 @@ class TestSlapOSPDMSkins(TestSlapOSPDMMixinSkins):
...
@@ -181,6 +181,7 @@ class TestSlapOSPDMSkins(TestSlapOSPDMMixinSkins):
def
test_getSortedSoftwareReleaseListFromSoftwareProduct
(
self
):
def
test_getSortedSoftwareReleaseListFromSoftwareProduct
(
self
):
project
=
self
.
addProject
()
project
=
self
.
addProject
()
software_product
=
self
.
_makeSoftwareProduct
(
project
)
software_product
=
self
.
_makeSoftwareProduct
(
project
)
self
.
tic
()
release_list
=
software_product
.
SoftwareProduct_getSortedSoftwareReleaseList
(
release_list
=
software_product
.
SoftwareProduct_getSortedSoftwareReleaseList
(
software_product
.
getReference
())
software_product
.
getReference
())
self
.
assertEqual
(
release_list
,
[])
self
.
assertEqual
(
release_list
,
[])
...
@@ -241,92 +242,6 @@ class TestSlapOSPDMSkins(TestSlapOSPDMMixinSkins):
...
@@ -241,92 +242,6 @@ class TestSlapOSPDMSkins(TestSlapOSPDMMixinSkins):
software_release_url
=
'http://example.org/1-%s.cfg'
%
self
.
new_id
)
software_release_url
=
'http://example.org/1-%s.cfg'
%
self
.
new_id
)
self
.
assertEqual
([
release
.
getUrlString
()
for
release
in
release_list
],
self
.
assertEqual
([
release
.
getUrlString
()
for
release
in
release_list
],
[
'http://example.org/1-%s.cfg'
%
self
.
new_id
,
'http://example.org/2-%s.cfg'
%
self
.
new_id
])
[
'http://example.org/1-%s.cfg'
%
self
.
new_id
,
'http://example.org/2-%s.cfg'
%
self
.
new_id
])
def
test_InstanceTree_getNewerSofwareRelease
(
self
):
project
=
self
.
addProject
()
person
=
self
.
_makePerson
(
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
project
)
software_product
=
self
.
_makeSoftwareProduct
(
project
)
oldest_software_url
=
'http://example.org/oldest-%s.cfg'
%
self
.
new_id
newest_software_url
=
'http://example.org/newest-%s.cfg'
%
self
.
new_id
self
.
_makeCustomSoftwareRelease
(
software_product
.
getRelativeUrl
(),
oldest_software_url
)
self
.
_makeCustomSoftwareRelease
(
software_product
.
getRelativeUrl
(),
newest_software_url
)
self
.
_makeSoftwareInstallation
(
compute_node
,
oldest_software_url
)
instance_tree
=
self
.
_makeFullInstanceTree
(
oldest_software_url
,
person
)
self
.
tic
()
self
.
assertEqual
(
instance_tree
.
InstanceTree_getNewerSofwareRelease
(),
None
)
self
.
_makeFullSoftwareInstance
(
instance_tree
,
oldest_software_url
)
self
.
tic
()
release
=
instance_tree
.
InstanceTree_getNewerSofwareRelease
()
self
.
assertEqual
(
release
.
getUrlString
(),
newest_software_url
)
def
testInstanceTree_getUpgradableSoftwareRelease_no_installation
(
self
):
project
=
self
.
addProject
()
person
=
self
.
_makePerson
(
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
project
)
self
.
_makeComputePartitions
(
compute_node
)
software_product
=
self
.
_makeSoftwareProduct
(
project
)
oldest_software_url
=
'http://example.org/oldest-%s.cfg'
%
self
.
new_id
newest_software_url
=
'http://example.org/newest-%s.cfg'
%
self
.
new_id
self
.
_makeCustomSoftwareRelease
(
software_product
.
getRelativeUrl
(),
oldest_software_url
)
self
.
_makeSoftwareInstallation
(
compute_node
,
oldest_software_url
)
hs
=
self
.
_makeFullInstanceTree
(
oldest_software_url
,
person
)
self
.
tic
()
self
.
assertEqual
(
hs
.
InstanceTree_getUpgradableSoftwareRelease
(),
None
)
self
.
_makeFullSoftwareInstance
(
hs
,
oldest_software_url
)
self
.
_markComputePartitionBusy
(
compute_node
,
hs
.
getSuccessorValue
())
self
.
_makeCustomSoftwareRelease
(
software_product
.
getRelativeUrl
(),
newest_software_url
)
self
.
tic
()
self
.
assertEqual
(
hs
.
InstanceTree_getUpgradableSoftwareRelease
(),
None
)
def
testInstanceTree_getUpgradableSoftwareRelease
(
self
):
project
=
self
.
addProject
()
person
=
self
.
_makePerson
(
project
)
compute_node
,
_
=
self
.
_makeComputeNode
(
project
)
self
.
_makeComputePartitions
(
compute_node
)
software_product
=
self
.
_makeSoftwareProduct
(
project
)
oldest_software_url
=
'http://example.org/oldest-%s.cfg'
%
self
.
new_id
newest_software_url
=
'http://example.org/newest-%s.cfg'
%
self
.
new_id
self
.
_makeCustomSoftwareRelease
(
software_product
.
getRelativeUrl
(),
oldest_software_url
)
self
.
_makeSoftwareInstallation
(
compute_node
,
oldest_software_url
)
hs
=
self
.
_makeFullInstanceTree
(
oldest_software_url
,
person
)
self
.
_makeFullSoftwareInstance
(
hs
,
oldest_software_url
)
self
.
_markComputePartitionBusy
(
compute_node
,
hs
.
getSuccessorValue
())
self
.
_makeCustomSoftwareRelease
(
software_product
.
getRelativeUrl
(),
newest_software_url
)
self
.
_makeSoftwareInstallation
(
compute_node
,
newest_software_url
)
# software_release should be ignored!
software_release
=
self
.
_makeSoftwareRelease
(
software_product
)
self
.
_makeSoftwareInstallation
(
compute_node
,
software_release
.
getUrlString
())
self
.
tic
()
release
=
hs
.
InstanceTree_getUpgradableSoftwareRelease
()
self
.
assertEqual
(
release
.
getUrlString
(),
newest_software_url
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
hs
,
'destroy_requested'
)
self
.
tic
()
self
.
assertEqual
(
hs
.
InstanceTree_getUpgradableSoftwareRelease
(),
None
)
def
testUpgradeDecision_getComputeNode
(
self
):
def
testUpgradeDecision_getComputeNode
(
self
):
project
=
self
.
addProject
()
project
=
self
.
addProject
()
...
...
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