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