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
4d4653e1
Commit
4d4653e1
authored
Jan 09, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: project needed in test
parent
693e7015
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
35 deletions
+30
-35
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.py
...omponents/test.erp5.testSlapOSCloudInteractionWorkflow.py
+27
-11
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.xml
...mponents/test.erp5.testSlapOSCloudInteractionWorkflow.xml
+3
-24
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.py
View file @
4d4653e1
...
@@ -23,7 +23,8 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
...
@@ -23,7 +23,8 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
class
TestSlapOSCoreSlapOSCloudInteractionWorkflow
(
SlapOSTestCaseMixin
):
class
TestSlapOSCoreSlapOSCloudInteractionWorkflow
(
SlapOSTestCaseMixin
):
def
test_ComputeNode_setSubjectList
(
self
):
def
test_ComputeNode_setSubjectList
(
self
):
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
...
@@ -40,7 +41,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -40,7 +41,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
self
.
person_user
.
getRelativeUrl
()
self
.
person_user
.
getRelativeUrl
()
def
check_Instance_validate
(
self
,
portal_type
):
def
check_Instance_validate
(
self
,
portal_type
):
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
# Instance Tree required for security.
# Instance Tree required for security.
...
@@ -49,14 +51,17 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -49,14 +51,17 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
title
=
"HS %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
title
=
"HS %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
reference
=
"TESTHS-%s"
%
self
.
new_id
,
reference
=
"TESTHS-%s"
%
self
.
new_id
,
destination_reference
=
"TESTHS-%s"
%
self
.
new_id
,
destination_reference
=
"TESTHS-%s"
%
self
.
new_id
,
destination_section
=
self
.
person_user
.
getRelativeUrl
()
destination_section
=
self
.
person_user
.
getRelativeUrl
(),
follow_up_value
=
project
)
)
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
portal_type
,
portal_type
=
portal_type
,
title
=
"Instance %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
title
=
"Instance %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
reference
=
"TESTINST-%s"
%
self
.
new_id
,
reference
=
"TESTINST-%s"
%
self
.
new_id
,
specialise_value
=
hs
)
specialise_value
=
hs
,
follow_up_value
=
project
)
if
portal_type
==
"Software Instance"
:
if
portal_type
==
"Software Instance"
:
self
.
_addERP5Login
(
instance
)
self
.
_addERP5Login
(
instance
)
...
@@ -89,7 +94,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -89,7 +94,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
return
self
.
check_Instance_validate
(
"Slave Instance"
)
return
self
.
check_Instance_validate
(
"Slave Instance"
)
def
test_SlaveInstance_requestDestroy
(
self
):
def
test_SlaveInstance_requestDestroy
(
self
):
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
# Instance Tree required for security.
# Instance Tree required for security.
...
@@ -98,7 +104,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -98,7 +104,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
title
=
"HS %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
title
=
"HS %s for %s"
%
(
self
.
new_id
,
self
.
person_user
.
getReference
()),
reference
=
"TESTHS-%s"
%
self
.
new_id
,
reference
=
"TESTHS-%s"
%
self
.
new_id
,
destination_reference
=
"TESTHS-%s"
%
self
.
new_id
,
destination_reference
=
"TESTHS-%s"
%
self
.
new_id
,
destination_section
=
self
.
person_user
.
getRelativeUrl
()
destination_section
=
self
.
person_user
.
getRelativeUrl
(),
follow_up_value
=
project
)
)
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
...
@@ -107,7 +114,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -107,7 +114,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
reference
=
"TESTINST-%s"
%
self
.
new_id
,
reference
=
"TESTINST-%s"
%
self
.
new_id
,
destination_reference
=
"TESTINST-%s"
%
self
.
new_id
,
destination_reference
=
"TESTINST-%s"
%
self
.
new_id
,
destination_section
=
self
.
person_user
.
getRelativeUrl
(),
destination_section
=
self
.
person_user
.
getRelativeUrl
(),
specialise_value
=
hs
specialise_value
=
hs
,
follow_up_value
=
project
)
)
request_kw
=
dict
(
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_release
=
'http://example.org'
,
...
@@ -124,7 +132,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -124,7 +132,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
self
.
assertEqual
(
instance
.
getValidationState
(),
'invalidated'
)
self
.
assertEqual
(
instance
.
getValidationState
(),
'invalidated'
)
def
check_SoftwareInstallation_changeState
(
self
,
method_id
):
def
check_SoftwareInstallation_changeState
(
self
,
method_id
):
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
portal_type
=
'Compute Node'
,
...
@@ -165,7 +174,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -165,7 +174,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
return
self
.
check_SoftwareInstallation_changeState
(
'requestDestroy'
)
return
self
.
check_SoftwareInstallation_changeState
(
'requestDestroy'
)
def
check_SoftwareInstance_changeState
(
self
,
method_id
):
def
check_SoftwareInstance_changeState
(
self
,
method_id
):
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
...
@@ -230,7 +240,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -230,7 +240,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
return
self
.
check_SoftwareInstance_changeState
(
"requestDestroy"
)
return
self
.
check_SoftwareInstance_changeState
(
"requestDestroy"
)
def
check_change_instance_parameter
(
self
,
portal_type
,
method_id
):
def
check_change_instance_parameter
(
self
,
portal_type
,
method_id
):
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
...
@@ -240,6 +251,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -240,6 +251,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
destination_reference
=
"TESTINST-%s"
%
self
.
new_id
,
destination_reference
=
"TESTINST-%s"
%
self
.
new_id
,
ssl_certificate
=
"foo"
,
ssl_certificate
=
"foo"
,
ssl_key
=
"bar"
,
ssl_key
=
"bar"
,
follow_up_value
=
project
)
)
self
.
tic
()
self
.
tic
()
...
@@ -286,7 +298,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -286,7 +298,8 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
def
test_SoftwareInstance_setSuccessorList
(
self
):
def
test_SoftwareInstance_setSuccessorList
(
self
):
portal_type
=
"Software Instance"
portal_type
=
"Software Instance"
self
.
person_user
=
self
.
makePerson
()
project
=
self
.
addProject
()
self
.
person_user
=
self
.
makePerson
(
project
)
self
.
login
(
self
.
person_user
.
getUserId
())
self
.
login
(
self
.
person_user
.
getUserId
())
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
...
@@ -297,6 +310,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -297,6 +310,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
destination_reference
=
"TESTINST-%s"
%
new_id
,
destination_reference
=
"TESTINST-%s"
%
new_id
,
ssl_certificate
=
"foo"
,
ssl_certificate
=
"foo"
,
ssl_key
=
"bar"
,
ssl_key
=
"bar"
,
follow_up_value
=
project
)
)
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
...
@@ -308,6 +322,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -308,6 +322,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
ssl_certificate
=
"foo"
,
ssl_certificate
=
"foo"
,
ssl_key
=
"bar"
,
ssl_key
=
"bar"
,
successor_value
=
instance3
,
successor_value
=
instance3
,
follow_up_value
=
project
)
)
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
...
@@ -319,6 +334,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
...
@@ -319,6 +334,7 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
ssl_certificate
=
"foo"
,
ssl_certificate
=
"foo"
,
ssl_key
=
"bar"
,
ssl_key
=
"bar"
,
successor_value
=
instance2
,
successor_value
=
instance2
,
follow_up_value
=
project
)
)
self
.
tic
()
self
.
tic
()
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.xml
View file @
4d4653e1
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</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>
testSlapOSCloudInteractionWorkflow
</string>
</value>
<value>
<string>
testSlapOSCloudInteractionWorkflow
</string>
</value>
...
@@ -61,28 +55,13 @@
...
@@ -61,28 +55,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</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>
...
@@ -95,7 +74,7 @@
...
@@ -95,7 +74,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -104,7 +83,7 @@
...
@@ -104,7 +83,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</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