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
Xiaowu Zhang
slapos.core
Commits
c8f7a5b1
Commit
c8f7a5b1
authored
Jun 03, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test in slapproxy: correct behavior of setting/getting connection parameters.
parent
a7c74958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
slapos/tests/slapproxy.py
slapos/tests/slapproxy.py
+24
-0
No files found.
slapos/tests/slapproxy.py
View file @
c8f7a5b1
...
@@ -261,6 +261,30 @@ class TestRequest(MasterMixin, unittest.TestCase):
...
@@ -261,6 +261,30 @@ class TestRequest(MasterMixin, unittest.TestCase):
"""
"""
Set of tests for requests
Set of tests for requests
"""
"""
def
test_request_get_connection_parameter
(
self
):
"""
Test that it is possible to fetch the correct parameters of an instance.
"""
self
.
add_free_partition
(
1
)
# XXX-Cedric : this is crazy. I don't want to define any requested_by_stupid_thing.
requested_by_partition_id
=
'0'
partition_reference
=
'myinstance'
connection_dict
=
{
'parameter'
:
'value'
}
# Request empty instance
partition
=
self
.
request
(
'http://sr//'
,
None
,
partition_reference
,
requested_by_partition_id
)
# Simulate instance being deployed, set connection parameters
self
.
setConnectionDict
(
partition
.
_partition_id
,
connection_dict
)
# Fetch parameters, compare with sent parameters
partition
=
self
.
request
(
'http://sr//'
,
None
,
partition_reference
,
requested_by_partition_id
)
self
.
assertEqual
(
partition
.
getConnectionParameterDict
(),
connection_dict
)
def
test_two_request_one_partition_free
(
self
):
def
test_two_request_one_partition_free
(
self
):
"""
"""
Since slapproxy does not implement scope, providing two partition_id
Since slapproxy does not implement scope, providing two partition_id
...
...
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