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
431fe7f9
Commit
431fe7f9
authored
Apr 05, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: drop checkCloudContract method
parent
8ba7d07a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
67 deletions
+7
-67
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
...omponents/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
+7
-67
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseDefaultScenarioMixin.py
View file @
431fe7f9
...
...
@@ -492,8 +492,13 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
shared_xml
=
shared_xml
,
)
self
.
checkCloudContract
(
person_user_id
,
person_reference
,
instance_title
,
software_release
,
software_type
,
server
)
# XXX search only for this user
instance_tree
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Instance Tree"
,
title
=
instance_title
,
follow_up__reference
=
project_reference
)
self
.
checkServiceSubscriptionRequest
(
instance_tree
)
self
.
stepCallSlaposAllocateInstanceAlarm
()
self
.
tic
()
...
...
@@ -589,71 +594,6 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self
.
stepCallSlaposAssertInstanceTreeSuccessorAlarm
()
self
.
tic
()
def
checkCloudContract
(
self
,
person_user_id
,
person_reference
,
instance_title
,
software_release
,
software_type
,
server
):
self
.
login
()
self
.
assertTrue
(
self
.
portal
.
portal_preferences
.
getPreferredCloudContractEnabled
())
self
.
stepCallSlaposContractRequestValidationPaymentAlarm
()
self
.
tic
()
# stabilise aggregated invoices and expand them
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
# update invoices with their tax & discount
self
.
stepCallSlaposTriggerBuildAlarm
()
self
.
tic
()
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
# update invoices with their tax & discount transaction lines
self
.
stepCallSlaposTriggerBuildAlarm
()
self
.
tic
()
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
# stop the invoices and solve them again
self
.
stepCallSlaposStopConfirmedAggregatedSaleInvoiceTransactionAlarm
()
self
.
tic
()
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
if
0
:
# trigger the CRM interaction
self
.
stepCallSlaposCrmCreateRegularisationRequestAlarm
()
self
.
tic
()
# trigger the CRM interaction
self
.
stepCallSlaposCrmCreateRegularisationRequestAlarm
()
self
.
tic
()
self
.
login
()
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Person"
,
user_id
=
person_user_id
)
contract
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Cloud Contract"
,
default_destination_section_uid
=
person
.
getUid
(),
validation_state
=
[
'invalidated'
,
'validated'
])
self
.
assertNotEqual
(
contract
,
None
)
if
contract
.
getValidationState
()
!=
'validated'
:
self
.
assertEqual
(
contract
.
getValidationState
(),
"invalidated"
)
# HACK FOR NOW
contract
.
validate
()
self
.
tic
()
self
.
login
(
person_user_id
)
self
.
stepCallSlaposContractRequestValidationPaymentAlarm
()
self
.
tic
()
def
checkInstanceAllocation
(
self
,
person_user_id
,
person_reference
,
instance_title
,
software_release
,
software_type
,
server
,
project_reference
):
...
...
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