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
2fa0c117
Commit
2fa0c117
authored
Dec 06, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_json_rpc_api: test
parent
d9099b77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
master/bt5/slapos_json_rpc_api/TestTemplateItem/portal_components/test.erp5.testSlapOSJsonRpc.py
...lateItem/portal_components/test.erp5.testSlapOSJsonRpc.py
+6
-9
No files found.
master/bt5/slapos_json_rpc_api/TestTemplateItem/portal_components/test.erp5.testSlapOSJsonRpc.py
View file @
2fa0c117
...
...
@@ -117,9 +117,6 @@ class TestSlapOSJsonRpcMixin(SlapOSTestCaseMixin):
env
=
{
'CONTENT_TYPE'
:
'application/json'
})
return
response
def
allDocsToApi
(
self
,
data_dict
):
return
self
.
callJsonRpcWebService
(
'nope'
,
data_dict
)
def
callUpdateRevision
(
self
):
self
.
portal
.
portal_alarms
.
slapos_update_jio_api_revision_template
.
activeSense
()
...
...
@@ -257,11 +254,11 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
self
.
callUpdateRevisionAndTic
()
self
.
login
(
self
.
compute_node_user_id
)
software_list_response
=
self
.
allDocsToApi
(
{
response
=
self
.
callJsonRpcWebService
(
"slapos.allDocs.slapos_jio_api_search_software_installation"
,
{
"compute_node_id"
:
self
.
compute_node_id
,
"portal_type"
:
"Software Installation"
,
})
response
=
self
.
portal
.
REQUEST
.
RESPONSE
software_list_response
=
json
.
loads
(
response
.
getBody
())
if
200
!=
response
.
getStatus
():
raise
ValueError
(
"Unexpected Result %s"
%
software_list_response
)
self
.
assertEqual
(
'application/json'
,
...
...
@@ -597,11 +594,11 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
self
.
callUpdateRevisionAndTic
()
instance
=
self
.
start_requested_software_instance
self
.
login
(
instance
.
getUserId
())
instance_list_response
=
self
.
allDocsToApi
(
{
response
=
self
.
callJsonRpcWebService
(
"slapos.allDocs.slapos_jio_api_search_instance"
,
{
"compute_node_id"
:
self
.
compute_node_id
,
"portal_type"
:
"Software Instance"
,
})
response
=
self
.
portal
.
REQUEST
.
RESPONSE
instance_list_response
=
json
.
loads
(
response
.
getBody
())
if
200
!=
response
.
getStatus
():
raise
ValueError
(
"Unexpected Result %s"
%
instance_list_response
)
self
.
assertEqual
(
'application/json'
,
...
...
@@ -678,11 +675,11 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check Slaves
self
.
login
(
instance
.
getUserId
())
# XXX It should be the same portal_type
shared_instance_list_response
=
self
.
allDocsToApi
(
{
response
=
self
.
callJsonRpcWebService
(
"slapos.get.slapos_jio_api_get_software_instance"
,
{
"host_instance_reference"
:
instance
.
getReference
(),
"portal_type"
:
"Shared Instance"
,
})
response
=
self
.
portal
.
REQUEST
.
RESPONSE
shared_instance_list_response
=
json
.
loads
(
response
.
getBody
())
if
200
!=
response
.
getStatus
():
raise
ValueError
(
"Unexpected Result %s"
%
shared_instance_list_response
)
self
.
assertEqual
(
'application/json'
,
...
...
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