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
Carlos Ramos Carreño
slapos.core
Commits
ecc697f5
Commit
ecc697f5
authored
Sep 20, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Make _test* more flexible for further customizations
parent
78df4788
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
...al_components/test.erp5.testSlapOSSubscriptionScenario.py
+23
-12
No files found.
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionScenario.py
View file @
ecc697f5
...
@@ -982,7 +982,7 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -982,7 +982,7 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
def
_test_subscription_scenario
(
self
,
amount
=
1
):
def
_test_subscription_scenario
(
self
,
amount
=
1
):
""" The admin creates an computer, user can request instances on it"""
""" The admin creates an computer, user can request instances on it"""
subscription_server
=
self
.
createPublicServerForAdminUser
()
s
elf
.
s
ubscription_server
=
self
.
createPublicServerForAdminUser
()
# Call as anonymous... check response?
# Call as anonymous... check response?
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
...
@@ -992,12 +992,14 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -992,12 +992,14 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
amount
,
name
,
default_email_text
)
amount
,
name
,
default_email_text
)
self
.
checkSubscriptionDeploymentAndSimulation
(
self
.
checkSubscriptionDeploymentAndSimulation
(
default_email_text
,
subscription_server
)
default_email_text
,
s
elf
.
s
ubscription_server
)
self
.
destroyAndCheckSubscription
(
self
.
destroyAndCheckSubscription
(
default_email_text
,
subscription_server
default_email_text
,
s
elf
.
s
ubscription_server
)
)
return
default_email_text
,
name
def
_test_subscription_scenario_with_existing_user
(
self
,
amount
=
1
,
language
=
None
):
def
_test_subscription_scenario_with_existing_user
(
self
,
amount
=
1
,
language
=
None
):
""" The admin creates an computer, user can request instances on it"""
""" The admin creates an computer, user can request instances on it"""
...
@@ -1009,13 +1011,13 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -1009,13 +1011,13 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
self
.
createNormalUser
(
default_email_text
,
name
,
language
)
self
.
createNormalUser
(
default_email_text
,
name
,
language
)
self
.
tic
()
self
.
tic
()
subscription_server
=
self
.
createPublicServerForAdminUser
()
s
elf
.
s
ubscription_server
=
self
.
createPublicServerForAdminUser
()
self
.
requestAndCheckHostingSubscription
(
self
.
requestAndCheckHostingSubscription
(
amount
,
name
,
default_email_text
)
amount
,
name
,
default_email_text
)
self
.
checkSubscriptionDeploymentAndSimulation
(
self
.
checkSubscriptionDeploymentAndSimulation
(
default_email_text
,
subscription_server
)
default_email_text
,
s
elf
.
s
ubscription_server
)
subscription_request
=
self
.
getSubscriptionRequest
(
subscription_request
=
self
.
getSubscriptionRequest
(
default_email_text
,
self
.
subscription_condition
)
default_email_text
,
self
.
subscription_condition
)
...
@@ -1024,14 +1026,17 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -1024,14 +1026,17 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
subscription_request
.
getDestinationSectionValue
())
subscription_request
.
getDestinationSectionValue
())
self
.
destroyAndCheckSubscription
(
self
.
destroyAndCheckSubscription
(
default_email_text
,
subscription_server
default_email_text
,
s
elf
.
s
ubscription_server
)
)
return
default_email_text
,
name
def
_test_two_subscription_scenario
(
self
,
amount
=
1
,
create_invitation
=
False
,
def
_test_two_subscription_scenario
(
self
,
amount
=
1
,
create_invitation
=
False
,
max_invoice_delay
=
0
,
max_invoice_credit_eur
=
0.0
,
max_invoice_credit_cny
=
0.0
):
max_invoice_delay
=
0
,
max_invoice_credit_eur
=
0.0
,
max_invoice_credit_cny
=
0.0
):
""" The admin creates an computer, user can request instances on it"""
""" The admin creates an computer, user can request instances on it"""
subscription_server
=
self
.
createPublicServerForAdminUser
()
s
elf
.
s
ubscription_server
=
self
.
createPublicServerForAdminUser
()
# Call as anonymous... check response?
# Call as anonymous... check response?
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
...
@@ -1138,16 +1143,19 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -1138,16 +1143,19 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
self
.
tic
()
self
.
tic
()
self
.
checkSubscriptionDeploymentAndSimulation
(
self
.
checkSubscriptionDeploymentAndSimulation
(
default_email_text
,
subscription_server
)
default_email_text
,
s
elf
.
s
ubscription_server
)
self
.
destroyAndCheckSubscription
(
self
.
destroyAndCheckSubscription
(
default_email_text
,
subscription_server
default_email_text
,
s
elf
.
s
ubscription_server
)
)
return
default_email_text
,
name
def
_test_subscription_scenario_with_reversal_transaction
(
self
,
amount
=
1
):
def
_test_subscription_scenario_with_reversal_transaction
(
self
,
amount
=
1
):
""" The admin creates an computer, user can request instances on it"""
""" The admin creates an computer, user can request instances on it"""
subscription_server
=
self
.
createPublicServerForAdminUser
()
s
elf
.
s
ubscription_server
=
self
.
createPublicServerForAdminUser
()
# Call as anonymous... check response?
# Call as anonymous... check response?
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
...
@@ -1155,12 +1163,15 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
...
@@ -1155,12 +1163,15 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
self
.
requestAndCheckHostingSubscription
(
amount
,
name
,
default_email_text
)
self
.
requestAndCheckHostingSubscription
(
amount
,
name
,
default_email_text
)
self
.
checkSubscriptionDeploymentAndSimulationWithReversalTransaction
(
self
.
checkSubscriptionDeploymentAndSimulationWithReversalTransaction
(
default_email_text
,
subscription_server
)
default_email_text
,
s
elf
.
s
ubscription_server
)
self
.
destroyAndCheckSubscription
(
self
.
destroyAndCheckSubscription
(
default_email_text
,
subscription_server
default_email_text
,
s
elf
.
s
ubscription_server
)
)
return
default_email_text
,
name
class
TestSlapOSSubscriptionScenario
(
TestSlapOSSubscriptionScenarioMixin
):
class
TestSlapOSSubscriptionScenario
(
TestSlapOSSubscriptionScenarioMixin
):
def
test_subscription_scenario_with_single_vm
(
self
):
def
test_subscription_scenario_with_single_vm
(
self
):
...
...
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