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
0
Merge Requests
0
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
Rafael Monnerat
slapos.core
Commits
46ffba6a
Commit
46ffba6a
authored
Feb 05, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: Update test for default scenario in order to handle Cloud Contracts
parent
b16472dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
14 deletions
+113
-14
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5DefaultScenario.py
...tal_components/test.erp5.testSlapOSERP5DefaultScenario.py
+81
-4
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5DefaultScenario.xml
...al_components/test.erp5.testSlapOSERP5DefaultScenario.xml
+32
-10
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5DefaultScenario.py
View file @
46ffba6a
...
@@ -12,7 +12,6 @@ from AccessControl.SecurityManagement import getSecurityManager, \
...
@@ -12,7 +12,6 @@ from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager
setSecurityManager
from
DateTime
import
DateTime
from
DateTime
import
DateTime
import
json
import
json
import
re
def
changeSkin
(
skin_name
):
def
changeSkin
(
skin_name
):
def
decorator
(
func
):
def
decorator
(
func
):
...
@@ -353,16 +352,94 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -353,16 +352,94 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
if
q
.
getTitle
()
==
instance_title
]
if
q
.
getTitle
()
==
instance_title
]
self
.
assertEqual
(
0
,
len
(
hosting_subscription_list
))
self
.
assertEqual
(
0
,
len
(
hosting_subscription_list
))
def
checkCloudContract
(
self
,
person_reference
,
instance_title
,
software_release
,
software_type
,
server
):
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
()
# build the aggregated payment
self
.
stepCallSlaposTriggerPaymentTransactionOrderBuilderAlarm
()
self
.
tic
()
# start the payzen payment
self
.
stepCallSlaposPayzenUpdateConfirmedPaymentAlarm
()
self
.
tic
()
# stabilise the payment deliveries and expand them
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
# trigger the CRM interaction
self
.
stepCallSlaposCrmCreateRegularisationRequestAlarm
()
self
.
tic
()
# trigger the CRM interaction
self
.
stepCallSlaposCrmCreateRegularisationRequestAlarm
()
self
.
tic
()
self
.
usePayzenManually
(
self
.
web_site
,
person_reference
)
self
.
tic
()
payment
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Payment Transaction"
,
simulation_state
=
"started"
)
self
.
logout
()
self
.
login
()
data_kw
=
{
'errorCode'
:
'0'
,
'transactionStatus'
:
'6'
,
'authAmount'
:
200
,
'authDevise'
:
'978'
,
}
payment
.
PaymentTransaction_createPayzenEvent
().
PayzenEvent_processUpdate
(
data_kw
,
True
)
self
.
login
(
person_reference
)
self
.
stepCallSlaposContractRequestValidationPaymentAlarm
()
self
.
tic
()
def
checkInstanceAllocation
(
self
,
person_reference
,
instance_title
,
def
checkInstanceAllocation
(
self
,
person_reference
,
instance_title
,
software_release
,
software_type
,
server
):
software_release
,
software_type
,
server
):
self
.
login
(
person_reference
)
self
.
login
(
person_reference
)
self
.
personRequestInstanceNotReady
(
self
.
personRequestInstanceNotReady
(
software_release
=
software_release
,
software_release
=
software_release
,
software_type
=
software_type
,
software_type
=
software_type
,
partition_reference
=
instance_title
,
partition_reference
=
instance_title
,
)
)
self
.
checkCloudContract
(
person_reference
,
instance_title
,
software_release
,
software_type
,
server
)
self
.
stepCallSlaposAllocateInstanceAlarm
()
self
.
stepCallSlaposAllocateInstanceAlarm
()
self
.
tic
()
self
.
tic
()
...
@@ -526,11 +603,11 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -526,11 +603,11 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
portal_type
=
"Payment Transaction"
,
portal_type
=
"Payment Transaction"
,
simulation_state
=
"started"
,
simulation_state
=
"started"
,
).
getId
()
).
getId
()
click_result
=
\
web_site
.
accounting_module
[
document_id
].
\
web_site
.
accounting_module
[
document_id
].
\
PaymentTransaction_redirectToManualPayzenPayment
()
PaymentTransaction_redirectToManualPayzenPayment
()
def
test
(
self
):
def
test
_default_scenario
(
self
):
# some preparation
# some preparation
self
.
logout
()
self
.
logout
()
self
.
web_site
=
self
.
portal
.
web_site_module
.
hosting
self
.
web_site
=
self
.
portal
.
web_site_module
.
hosting
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5DefaultScenario.xml
View file @
46ffba6a
...
@@ -6,10 +6,22 @@
...
@@ -6,10 +6,22 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSERP5DefaultScenario
</string>
</value>
<value>
<string>
testSlapOSERP5DefaultScenario
</string>
</value>
</item>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testSlapOSERP5DefaultScenario
</string>
</value>
<value>
<string>
test.erp5.testSlapOSERP5DefaultScenario
</string>
</value>
...
@@ -27,18 +39,13 @@
...
@@ -27,18 +39,13 @@
<item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<value>
<tuple>
<tuple/>
<string>
F: 8, 0: Unable to import \'testSlapOSCloudSecurityGroup\' (import-error)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple/>
<string>
W: 15, 0: Reimport \'re\' (imported line 9) (reimported)
</string>
<string>
W:529, 4: Unused variable \'click_result\' (unused-variable)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -48,13 +55,28 @@
...
@@ -48,13 +55,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -67,7 +89,7 @@
...
@@ -67,7 +89,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -76,7 +98,7 @@
...
@@ -76,7 +98,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
</pickle>
...
...
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