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
7c7c354d
Commit
7c7c354d
authored
Oct 03, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: check kthat correct release/type have been selected
parent
ac7c11e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5VirtualMasterScenario.py
...mponents/test.erp5.testSlapOSERP5VirtualMasterScenario.py
+26
-6
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5VirtualMasterScenario.py
View file @
7c7c354d
...
...
@@ -174,6 +174,7 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
)
public_server_software
=
self
.
generateNewSoftwareReleaseUrl
()
public_instance_type
=
'public type'
# XXX who create the product
# define the security
...
...
@@ -218,12 +219,30 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
)
software_product
.
newContent
(
portal_type
=
"Software Product Release Variation"
,
title
=
"my super release"
,
title
=
"my old release"
,
url_string
=
public_server_software
+
'-1'
)
release_variation
=
software_product
.
newContent
(
portal_type
=
"Software Product Release Variation"
,
title
=
"my current release"
,
url_string
=
public_server_software
)
software_product
.
newContent
(
portal_type
=
"Software Product Release Variation"
,
title
=
"my futur release"
,
url_string
=
public_server_software
+
'+1'
)
software_product
.
newContent
(
portal_type
=
"Software Product Type Variation"
,
title
=
"my super type"
title
=
public_instance_type
+
'-1'
)
type_variation
=
software_product
.
newContent
(
portal_type
=
"Software Product Type Variation"
,
title
=
public_instance_type
)
software_product
.
newContent
(
portal_type
=
"Software Product Type Variation"
,
title
=
public_instance_type
+
'+1'
)
software_product
.
validate
()
...
...
@@ -280,7 +299,6 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
reference
=
public_reference
).
getParentValue
()
public_instance_title
=
'Public title %s'
%
self
.
generateNewId
()
public_instance_type
=
'public type'
self
.
checkInstanceAllocation
(
public_person
.
getUserId
(),
public_reference
,
public_instance_title
,
public_server_software
,
public_instance_type
,
...
...
@@ -336,10 +354,12 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
})
assert
len
(
inventory_list
)
==
1
,
len
(
inventory_list
)
assert
inventory_list
[
0
].
quantity
==
1
,
inventory_list
[
0
].
quantity
resource_vcl
=
list
(
software_product
.
getVariationCategoryList
(
omit_individual_variation
=
0
))
resource_vcl
=
[
'software_release/%s'
%
release_variation
.
getRelativeUrl
(),
'software_type/%s'
%
type_variation
.
getRelativeUrl
()
]
resource_vcl
.
sort
()
assert
inventory_list
[
0
].
getVariationCategoryList
()
==
resource_vcl
,
inventory_list
[
0
].
getVariationCategoryList
(
)
assert
inventory_list
[
0
].
getVariationCategoryList
()
==
resource_vcl
,
"%s %s"
%
(
resource_vcl
,
inventory_list
[
0
].
getVariationCategoryList
()
)
# Check accounting
transaction_list
=
self
.
portal
.
account_module
.
receivable
.
Account_getAccountingTransactionList
(
mirror_section_uid
=
public_person
.
getUid
())
...
...
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