Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Ophélie Gagnard
slapos
Commits
4de726fb
Commit
4de726fb
authored
Apr 20, 2015
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re6stnet test: update scripts with new parameters
parent
3205dfad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
slapos/test/recipe/test_re6stnet.py
slapos/test/recipe/test_re6stnet.py
+14
-9
No files found.
slapos/test/recipe/test_re6stnet.py
View file @
4de726fb
...
...
@@ -32,6 +32,7 @@ class Re6stnetTest(unittest.TestCase):
'config-file'
:
config_file
,
'ipv4'
:
'127.0.0.1'
,
'port'
:
'9201'
,
'pid-file'
:
'/path/to/pid/file'
,
'db-path'
:
'/path/to/db'
,
'command'
:
'/path/to/command'
,
'manager-wrapper'
:
os
.
path
.
join
(
self
.
base_dir
,
'manager_wrapper'
),
...
...
@@ -98,6 +99,8 @@ class Re6stnetTest(unittest.TestCase):
with
open
(
path
,
'r'
)
as
f
:
content
=
f
.
read
()
self
.
assertIn
(
"@%s"
%
config_file
,
content
)
self
.
assertIn
(
"/path/to/pid/file"
,
content
)
self
.
assertIn
(
"/path/to/command"
,
content
)
def
fake_generateCertificates
(
self
):
return
...
...
@@ -138,10 +141,7 @@ class Re6stnetTest(unittest.TestCase):
self
.
assertEqual
(
serial
,
'0x120010db80024'
)
def
test_install
(
self
):
recipe
=
self
.
new_recipe
()
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
recipe
.
options
.
update
({
self
.
options
.
update
({
'ipv6-prefix'
:
'2001:db8:24::/48'
,
'slave-instance-list'
:
'''[
{"slave_reference":"SOFTINST-58770"},
...
...
@@ -150,6 +150,9 @@ class Re6stnetTest(unittest.TestCase):
'''
})
recipe
=
self
.
new_recipe
()
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
try
:
recipe
.
install
()
except
(
NotFoundError
,
ConnectionError
):
...
...
@@ -185,9 +188,12 @@ class Re6stnetTest(unittest.TestCase):
self
.
checkRegistryWrapper
()
# Remove one element
recipe
.
options
.
update
({
self
.
options
.
update
({
"slave-instance-list"
:
"""[{"slave_reference":"SOFTINST-58770"}]"""
})
recipe
=
self
.
new_recipe
()
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
try
:
recipe
.
install
()
except
(
NotFoundError
,
ConnectionError
):
...
...
@@ -204,12 +210,11 @@ class Re6stnetTest(unittest.TestCase):
self
.
assertEqual
(
second_add
,
second_remove
)
def
test_install_empty_slave
(
self
):
recipe
=
self
.
new_recipe
()
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
recipe
.
options
.
update
({
self
.
options
.
update
({
'ipv6-prefix'
:
'2001:db8:24::/48'
})
recipe
=
self
.
new_recipe
()
recipe
.
generateCertificate
=
self
.
fake_generateCertificates
recipe
.
install
()
...
...
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