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
Hardik Juneja
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
Hide 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, \
setSecurityManager
from
DateTime
import
DateTime
import
json
import
re
def
changeSkin
(
skin_name
):
def
decorator
(
func
):
...
...
@@ -353,15 +352,93 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
if
q
.
getTitle
()
==
instance_title
]
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
,
software_release
,
software_type
,
server
):
self
.
login
(
person_reference
)
self
.
personRequestInstanceNotReady
(
software_release
=
software_release
,
software_type
=
software_type
,
partition_reference
=
instance_title
,
)
self
.
checkCloudContract
(
person_reference
,
instance_title
,
software_release
,
software_type
,
server
)
self
.
stepCallSlaposAllocateInstanceAlarm
()
self
.
tic
()
...
...
@@ -526,11 +603,11 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
portal_type
=
"Payment Transaction"
,
simulation_state
=
"started"
,
).
getId
()
click_result
=
\
web_site
.
accounting_module
[
document_id
].
\
web_site
.
accounting_module
[
document_id
].
\
PaymentTransaction_redirectToManualPayzenPayment
()
def
test
(
self
):
def
test
_default_scenario
(
self
):
# some preparation
self
.
logout
()
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 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSERP5DefaultScenario
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testSlapOSERP5DefaultScenario
</string>
</value>
...
...
@@ -27,18 +39,13 @@
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple>
<string>
F: 8, 0: Unable to import \'testSlapOSCloudSecurityGroup\' (import-error)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 15, 0: Reimport \'re\' (imported line 9) (reimported)
</string>
<string>
W:529, 4: Unused variable \'click_result\' (unused-variable)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -48,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -67,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -76,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</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