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
d93e3539
Commit
d93e3539
authored
Jun 26, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: No need create compute node on subscription scenario
parent
c9234c2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
44 deletions
+10
-44
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5SubscriptionScenario.py
...omponents/test.erp5.testSlapOSERP5SubscriptionScenario.py
+10
-44
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5SubscriptionScenario.py
View file @
d93e3539
...
@@ -79,7 +79,7 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
...
@@ -79,7 +79,7 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
public_server_software
=
self
.
generateNewSoftwareReleaseUrl
()
public_server_software
=
self
.
generateNewSoftwareReleaseUrl
()
public_instance_type
=
'public type'
public_instance_type
=
'public type'
software_product
,
release_variation
,
type_variation
=
self
.
addSoftwareProduct
(
software_product
,
_
,
_
=
self
.
addSoftwareProduct
(
"instance product"
,
project
,
public_server_software
,
public_instance_type
"instance product"
,
project
,
public_server_software
,
public_instance_type
)
)
...
@@ -122,31 +122,10 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
...
@@ -122,31 +122,10 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
self
.
addProjectProductionManagerAssignment
(
owner_person
,
project
)
self
.
addProjectProductionManagerAssignment
(
owner_person
,
project
)
self
.
tic
()
self
.
tic
()
# hooray, now it is time to create compute_nodes
self
.
login
(
owner_person
.
getUserId
())
public_server_title
=
'Public Server for %s'
%
owner_reference
public_server_id
=
self
.
requestComputeNode
(
public_server_title
,
project
.
getReference
())
public_server
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Compute Node'
,
reference
=
public_server_id
)
self
.
setAccessToMemcached
(
public_server
)
self
.
assertNotEqual
(
None
,
public_server
)
self
.
setServerOpenPublic
(
public_server
)
public_server
.
generateCertificate
()
self
.
addAllocationSupply
(
"for compute node"
,
public_server
,
software_product
,
release_variation
,
type_variation
)
# and install some software on them
self
.
supplySoftware
(
public_server
,
public_server_software
)
# format the compute_nodes
self
.
formatComputeNode
(
public_server
)
self
.
logout
()
self
.
login
(
project_owner_person
.
getUserId
())
self
.
login
(
project_owner_person
.
getUserId
())
# Pay deposit to validate virtual master
+ one computer
# Pay deposit to validate virtual master
deposit_amount
=
42.0
+
99.0
deposit_amount
=
42.0
ledger
=
self
.
portal
.
portal_categories
.
ledger
.
automated
ledger
=
self
.
portal
.
portal_categories
.
ledger
.
automated
outstanding_amount_list
=
project_owner_person
.
Entity_getOutstandingDepositAmountList
(
outstanding_amount_list
=
project_owner_person
.
Entity_getOutstandingDepositAmountList
(
...
@@ -244,18 +223,8 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
...
@@ -244,18 +223,8 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
self
.
tic
()
self
.
tic
()
subscription_request
=
self
.
checkServiceSubscriptionRequest
(
instance_tree
,
'cancelled'
)
subscription_request
=
self
.
checkServiceSubscriptionRequest
(
instance_tree
,
'cancelled'
)
# and uninstall some software on them
self
.
logout
()
self
.
logout
()
self
.
login
(
owner_person
.
getUserId
())
self
.
supplySoftware
(
public_server
,
public_server_software
,
state
=
'destroyed'
)
self
.
logout
()
# Uninstall from compute_node
self
.
login
()
self
.
login
()
self
.
simulateSlapgridSR
(
public_server
)
self
.
tic
()
# Check stock
# Check stock
# Instance was celled before generate simulation
# Instance was celled before generate simulation
...
@@ -278,22 +247,19 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
...
@@ -278,22 +247,19 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
self
.
login
()
self
.
login
()
# Ensure no unexpected object has been created
# Ensure no unexpected object has been created
# 2 accounting transaction / line
# 1 accounting transaction / line
# 3 allocation supply / line / cell
# 1 compute node
# 2 credential request
# 2 credential request
#
2
event
#
1
event
# 1 instance tree
# 1 instance tree
#
3
open sale order / line
#
1
open sale order / line
# 5 (can reduce to 2) assignment
# 5 (can reduce to 2) assignment
#
16
simulation mvt
#
2
simulation mvt
#
3
packing list / line
#
1
packing list / line
# 3 sale supply / line
# 3 sale supply / line
# 2 sale trade condition
# 2 sale trade condition
# 1 software installation
# 1 software installation
# 1 software instance
# 1 software product
# 1 software product
#
3
subscription requests
#
2
subscription requests
self
.
assertRelatedObjectCount
(
project
,
48
)
self
.
assertRelatedObjectCount
(
project
,
22
)
self
.
checkERP5StateBeforeExit
()
self
.
checkERP5StateBeforeExit
()
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