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
18
Merge Requests
18
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
nexedi
slapos.core
Commits
9b920c16
Commit
9b920c16
authored
Apr 18, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Update tests on Certificate Renew
parent
5fbda526
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudComputeNodeSlapInterfaceWorkflow.py
...t.erp5.testSlapOSCloudComputeNodeSlapInterfaceWorkflow.py
+7
-11
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.testSlapOSCloudComputeNodeSlapInterfaceWorkflow.py
View file @
9b920c16
...
...
@@ -307,7 +307,9 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
self
.
assertTrue
(
serial
in
compute_node_certificate
)
self
.
assertTrue
(
self
.
compute_node
.
getReference
()
in
compute_node_certificate
.
decode
(
'string_escape'
))
self
.
compute_node
.
renewCertificate
()
self
.
compute_node
.
revokeCertificate
()
self
.
compute_node
.
generateCertificate
()
self
.
assertNotEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_key'
))
self
.
assertNotEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_certificate'
))
self
.
assertNotEqual
(
None
,
self
.
compute_node
.
getDestinationReference
())
...
...
@@ -316,14 +318,6 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
self
.
assertNotEqual
(
compute_node_certificate
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_certificate'
))
self
.
assertNotEqual
(
destination_reference
,
self
.
compute_node
.
getDestinationReference
())
def
test_renewCertificateNoCertificate
(
self
):
self
.
login
(
self
.
compute_node
.
getUserId
())
self
.
assertRaises
(
ValueError
,
self
.
compute_node
.
renewCertificate
)
self
.
assertEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_key'
))
self
.
assertEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_certificate'
))
self
.
assertEqual
(
None
,
self
.
compute_node
.
getDestinationReference
())
def
test_renewCertificate_twice
(
self
):
self
.
login
(
self
.
compute_node
.
getUserId
())
self
.
compute_node
.
generateCertificate
()
...
...
@@ -338,7 +332,8 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
self
.
assertTrue
(
serial
in
compute_node_certificate
)
self
.
assertTrue
(
self
.
compute_node
.
getReference
()
in
compute_node_certificate
.
decode
(
'string_escape'
))
self
.
compute_node
.
renewCertificate
()
self
.
compute_node
.
revokeCertificate
()
self
.
compute_node
.
generateCertificate
()
self
.
assertNotEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_key'
))
self
.
assertNotEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_certificate'
))
self
.
assertNotEqual
(
None
,
self
.
compute_node
.
getDestinationReference
())
...
...
@@ -351,7 +346,8 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
compute_node_certificate
=
self
.
portal
.
REQUEST
.
get
(
'compute_node_certificate'
)
destination_reference
=
self
.
compute_node
.
getDestinationReference
()
self
.
compute_node
.
renewCertificate
()
self
.
compute_node
.
revokeCertificate
()
self
.
compute_node
.
generateCertificate
()
self
.
assertNotEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_key'
))
self
.
assertNotEqual
(
None
,
self
.
portal
.
REQUEST
.
get
(
'compute_node_certificate'
))
self
.
assertNotEqual
(
None
,
self
.
compute_node
.
getDestinationReference
())
...
...
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