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
Léo-Paul Géneau
slapos.core
Commits
35a1ecde
Commit
35a1ecde
authored
Nov 10, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typos
parent
cb9334d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
slapos/tests/test_slapproxy.py
slapos/tests/test_slapproxy.py
+7
-7
No files found.
slapos/tests/test_slapproxy.py
View file @
35a1ecde
...
...
@@ -1770,7 +1770,7 @@ database_uri = %(rootdir)s/lib/external_proxy.db
self
.
assertEqual
(
'external_computer'
,
partition
.
slap_computer_id
)
self
.
assertEqual
(
'slappart0'
,
partition
.
slap_computer_partition_id
)
def
_checkInstanceIsFowarded
(
self
,
name
,
requester
,
partition_parameter_kw
,
software_release
):
def
_checkInstanceIsFo
r
warded
(
self
,
name
,
requester
,
partition_parameter_kw
,
software_release
):
"""
Test there is no instance on local proxy.
Test there is instance on external proxy.
...
...
@@ -1858,7 +1858,7 @@ database_uri = %(rootdir)s/lib/external_proxy.db
partition
=
self
.
request
(
self
.
software_release_not_in_list
,
None
,
instance_reference
,
'slappart0'
,
filter_kw
=
filter_kw
,
partition_parameter_kw
=
dummy_parameter_dict
)
self
.
_checkInstanceIsFowarded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
software_release_not_in_list
)
self
.
_checkInstanceIsFo
r
warded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
software_release_not_in_list
)
self
.
assertEqual
(
partition
.
_master_url
,
self
.
external_master_url
...
...
@@ -1880,11 +1880,11 @@ database_uri = %(rootdir)s/lib/external_proxy.db
partition
=
self
.
request
(
self
.
software_release_not_in_list
,
None
,
instance_reference
,
'slappart0'
,
filter_kw
=
filter_kw
,
partition_parameter_kw
=
dummy_parameter_dict
)
# Explicitly do the relevant test, even if _checkInstanceIsFowarded does it too
# Explicitly do the relevant test, even if _checkInstanceIsFo
r
warded does it too
entries
=
slapos
.
proxy
.
views
.
execute_db
(
'forwarded_partition_request'
,
'SELECT * from %s'
,
db
=
self
.
db
)
self
.
assertEqual
(
len
(
entries
),
1
)
self
.
_checkInstanceIsFowarded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
software_release_not_in_list
)
self
.
_checkInstanceIsFo
r
warded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
software_release_not_in_list
)
self
.
assertEqual
(
partition
.
_master_url
,
self
.
external_master_url
...
...
@@ -1915,7 +1915,7 @@ database_uri = %(rootdir)s/lib/external_proxy.db
partition
=
self
.
request
(
self
.
external_software_release
,
None
,
instance_reference
,
'slappart0'
,
partition_parameter_kw
=
dummy_parameter_dict
)
self
.
_checkInstanceIsFowarded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
external_software_release
)
self
.
_checkInstanceIsFo
r
warded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
external_software_release
)
instance_parameter_dict
=
partition
.
getInstanceParameterDict
()
instance_parameter_dict
.
pop
(
'timestamp'
)
...
...
@@ -1937,11 +1937,11 @@ database_uri = %(rootdir)s/lib/external_proxy.db
partition
=
self
.
request
(
self
.
external_software_release
,
None
,
instance_reference
,
'slappart0'
,
partition_parameter_kw
=
dummy_parameter_dict
)
# Explicitly do the relevant test, even if _checkInstanceIsFowarded does it too
# Explicitly do the relevant test, even if _checkInstanceIsFo
r
warded does it too
entries
=
slapos
.
proxy
.
views
.
execute_db
(
'forwarded_partition_request'
,
'SELECT * from %s'
,
db
=
self
.
db
)
self
.
assertEqual
(
len
(
entries
),
1
)
self
.
_checkInstanceIsFowarded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
external_software_release
)
self
.
_checkInstanceIsFo
r
warded
(
instance_reference
,
'slappart0'
,
dummy_parameter_dict
,
self
.
external_software_release
)
instance_parameter_dict
=
partition
.
getInstanceParameterDict
()
instance_parameter_dict
.
pop
(
'timestamp'
)
...
...
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