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
Thomas Leymonerie
slapos.core
Commits
c6076af8
Commit
c6076af8
authored
Feb 13, 2019
by
Łukasz Nowak
Committed by
Julien Muchembled
Feb 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos proxy/test: Assert integers in request/publish
/reviewed-on
nexedi/slapos.core!99
parent
b8bd51d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
slapos/tests/test_slapproxy/__init__.py
slapos/tests/test_slapproxy/__init__.py
+25
-0
No files found.
slapos/tests/test_slapproxy/__init__.py
View file @
c6076af8
...
...
@@ -615,6 +615,31 @@ class TestRequest(MasterMixin):
partition_parameter_kw
=
{
'text'
:
u'Привет Мир!'
})
self
.
assertIsInstance
(
request
,
slapos
.
slap
.
ComputerPartition
)
def
test_request_with_int
(
self
):
"""
Verify that request with int parameters is correctly accepted
"""
self
.
add_free_partition
(
1
)
request
=
self
.
request
(
'http://sr//'
,
None
,
'myinstance'
,
'slappart0'
,
partition_parameter_kw
=
{
'int'
:
1
})
self
.
assertIsInstance
(
request
,
slapos
.
slap
.
ComputerPartition
)
def
test_request_set_connection_parameters_with_int
(
self
):
"""
Verify that request int works in connection parameters
"""
self
.
add_free_partition
(
1
)
partition_id
=
self
.
request
(
'http://sr//'
,
None
,
'myinstance'
,
'slappart0'
).
_partition_id
# Set connection parameter
partition
=
self
.
getPartitionInformation
(
partition_id
)
self
.
setConnectionDict
(
partition_id
=
partition_id
,
connection_dict
=
{
'foo'
:
1
})
# Get updated information for the partition
partition_new
=
self
.
request
(
'http://sr//'
,
None
,
'myinstance'
,
'slappart0'
)
self
.
assertEqual
(
partition_new
.
getConnectionParameter
(
'foo'
),
'1'
)
class
TestSlaveRequest
(
MasterMixin
):
"""
...
...
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