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
a49d2454
Commit
a49d2454
authored
Jan 09, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: project needed in test
parent
22486f55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
11 deletions
+27
-11
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.py
...omponents/test.erp5.testSlapOSCloudInteractionWorkflow.py
+27
-11
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudInteractionWorkflow.py
View file @
a49d2454
...
...
@@ -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
.
_addCertificateLogin
(
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
()
...
...
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