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
4bc3c321
Commit
4bc3c321
authored
Jun 06, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] Change partition names in proxy-test to point to existing test partitions
parent
6e60fdd2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
slapos/tests/slapproxy/__init__.py
slapos/tests/slapproxy/__init__.py
+14
-14
No files found.
slapos/tests/slapproxy/__init__.py
View file @
4bc3c321
...
@@ -378,10 +378,10 @@ class TestRequest(MasterMixin):
...
@@ -378,10 +378,10 @@ class TestRequest(MasterMixin):
"""
"""
self
.
add_free_partition
(
1
)
self
.
add_free_partition
(
1
)
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
),
'MyFirstInstance'
,
'slappart
0
'
),
slapos
.
slap
.
ComputerPartition
)
slapos
.
slap
.
ComputerPartition
)
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
3
'
),
'MyFirstInstance'
,
'slappart
1
'
),
slapos
.
slap
.
ComputerPartition
)
slapos
.
slap
.
ComputerPartition
)
def
test_two_request_two_partition_free
(
self
):
def
test_two_request_two_partition_free
(
self
):
...
@@ -391,10 +391,10 @@ class TestRequest(MasterMixin):
...
@@ -391,10 +391,10 @@ class TestRequest(MasterMixin):
"""
"""
self
.
add_free_partition
(
2
)
self
.
add_free_partition
(
2
)
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
),
'MyFirstInstance'
,
'slappart
0
'
),
slapos
.
slap
.
ComputerPartition
)
slapos
.
slap
.
ComputerPartition
)
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
self
.
assertIsInstance
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
3
'
),
'MyFirstInstance'
,
'slappart
1
'
),
slapos
.
slap
.
ComputerPartition
)
slapos
.
slap
.
ComputerPartition
)
def
test_two_same_request_from_one_partition
(
self
):
def
test_two_same_request_from_one_partition
(
self
):
...
@@ -403,8 +403,8 @@ class TestRequest(MasterMixin):
...
@@ -403,8 +403,8 @@ class TestRequest(MasterMixin):
"""
"""
self
.
add_free_partition
(
2
)
self
.
add_free_partition
(
2
)
self
.
assertEqual
(
self
.
assertEqual
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
).
__dict__
,
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
1
'
).
__dict__
,
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
).
__dict__
)
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
1
'
).
__dict__
)
def
test_request_propagate_partition_state
(
self
):
def
test_request_propagate_partition_state
(
self
):
"""
"""
...
@@ -457,12 +457,12 @@ class TestRequest(MasterMixin):
...
@@ -457,12 +457,12 @@ class TestRequest(MasterMixin):
wanted_domain1
=
'fou.org'
wanted_domain1
=
'fou.org'
wanted_domain2
=
'carzy.org'
wanted_domain2
=
'carzy.org'
request1
=
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
,
request1
=
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
1
'
,
partition_parameter_kw
=
{
'domain'
:
wanted_domain1
})
partition_parameter_kw
=
{
'domain'
:
wanted_domain1
})
request1_dict
=
request1
.
__dict__
request1_dict
=
request1
.
__dict__
requested_result1
=
self
.
getPartitionInformation
(
requested_result1
=
self
.
getPartitionInformation
(
request1_dict
[
'_partition_id'
])
request1_dict
[
'_partition_id'
])
request2
=
self
.
request
(
'http://sr//'
,
'Papa'
,
'MyFirstInstance'
,
'slappart
2
'
,
request2
=
self
.
request
(
'http://sr//'
,
'Papa'
,
'MyFirstInstance'
,
'slappart
1
'
,
partition_parameter_kw
=
{
'domain'
:
wanted_domain2
})
partition_parameter_kw
=
{
'domain'
:
wanted_domain2
})
request2_dict
=
request2
.
__dict__
request2_dict
=
request2
.
__dict__
requested_result2
=
self
.
getPartitionInformation
(
requested_result2
=
self
.
getPartitionInformation
(
...
@@ -494,12 +494,12 @@ class TestRequest(MasterMixin):
...
@@ -494,12 +494,12 @@ class TestRequest(MasterMixin):
wanted_domain1
=
'fou.org'
wanted_domain1
=
'fou.org'
wanted_domain2
=
'carzy.org'
wanted_domain2
=
'carzy.org'
request1
=
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
,
request1
=
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
1
'
,
partition_parameter_kw
=
{
'domain'
:
wanted_domain1
})
partition_parameter_kw
=
{
'domain'
:
wanted_domain1
})
request1_dict
=
request1
.
__dict__
request1_dict
=
request1
.
__dict__
requested_result1
=
self
.
getPartitionInformation
(
requested_result1
=
self
.
getPartitionInformation
(
request1_dict
[
'_partition_id'
])
request1_dict
[
'_partition_id'
])
request2
=
self
.
request
(
'http://sr1//'
,
'Papa'
,
'MyFirstInstance'
,
'slappart
2
'
,
request2
=
self
.
request
(
'http://sr1//'
,
'Papa'
,
'MyFirstInstance'
,
'slappart
1
'
,
partition_parameter_kw
=
{
'domain'
:
wanted_domain2
})
partition_parameter_kw
=
{
'domain'
:
wanted_domain2
})
request2_dict
=
request2
.
__dict__
request2_dict
=
request2
.
__dict__
requested_result2
=
self
.
getPartitionInformation
(
requested_result2
=
self
.
getPartitionInformation
(
...
@@ -532,8 +532,8 @@ class TestRequest(MasterMixin):
...
@@ -532,8 +532,8 @@ class TestRequest(MasterMixin):
"""
"""
self
.
add_free_partition
(
2
)
self
.
add_free_partition
(
2
)
self
.
assertEqual
(
self
.
assertEqual
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
).
__dict__
,
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
0
'
).
__dict__
,
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
3
'
).
__dict__
)
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
1
'
).
__dict__
)
def
test_two_different_request_from_one_partition
(
self
):
def
test_two_different_request_from_one_partition
(
self
):
"""
"""
...
@@ -542,8 +542,8 @@ class TestRequest(MasterMixin):
...
@@ -542,8 +542,8 @@ class TestRequest(MasterMixin):
"""
"""
self
.
add_free_partition
(
2
)
self
.
add_free_partition
(
2
)
self
.
assertNotEqual
(
self
.
assertNotEqual
(
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
2
'
).
__dict__
,
self
.
request
(
'http://sr//'
,
None
,
'MyFirstInstance'
,
'slappart
1
'
).
__dict__
,
self
.
request
(
'http://sr//'
,
None
,
'frontend'
,
'slappart
2
'
).
__dict__
)
self
.
request
(
'http://sr//'
,
None
,
'frontend'
,
'slappart
1
'
).
__dict__
)
def
test_request_with_nonascii_parameters
(
self
):
def
test_request_with_nonascii_parameters
(
self
):
"""
"""
...
...
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