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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
0ed37ee5
Commit
0ed37ee5
authored
May 26, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: Add test for UpgradeDecision_getAggregateUrlString
parent
c5a7a1a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/UpgradeDecision_getAggregateUrlString.xml
...kins/slapos_pdm/UpgradeDecision_getAggregateUrlString.xml
+1
-1
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
+11
-0
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/UpgradeDecision_getAggregateUrlString.xml
View file @
0ed37ee5
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
document_portal_type="Softw
w
are Release"
</string>
</value>
<value>
<string>
document_portal_type="Software Release"
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMSkins.py
View file @
0ed37ee5
...
...
@@ -467,6 +467,17 @@ class TestSlapOSPDMSkins(TestSlapOSPDMMixinSkins):
found_software_release
=
upgrade_decision
.
UpgradeDecision_getAggregateValue
(
"Software Release"
)
self
.
assertEqual
(
None
,
found_software_release
)
def
testUpgradeDecision_getAggregateUrlString_SoftwareRelease
(
self
):
software_release
=
self
.
_makeSoftwareRelease
()
upgrade_decision
=
self
.
_makeUpgradeDecision
()
upgrade_decision_line
=
self
.
_makeUpgradeDecisionLine
(
upgrade_decision
)
upgrade_decision_line
.
setAggregateValue
(
software_release
)
url_string
=
upgrade_decision
.
UpgradeDecision_getAggregateUrlString
()
self
.
assertNotEqual
(
None
,
url_string
)
self
.
assertEqual
(
software_release
.
getUrlString
(),
url_string
)
def
testSoftwareRelease_createUpgradeDecision_compute_node
(
self
):
person
=
self
.
_makePerson
()
compute_node
,
_
=
self
.
_makeComputeNode
(
owner
=
person
)
...
...
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