Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
re6stnet
Commits
8dea5c16
Commit
8dea5c16
authored
Jun 09, 2024
by
Tom Niget
Committed by
Julien Muchembled
Sep 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests expect a clean work directory, otherwise weird behavior will occur
parent
14d94398
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
re6st/tests/test_end2end/test_registry_client.py
re6st/tests/test_end2end/test_registry_client.py
+2
-2
re6st/tests/test_network/re6st_wrap.py
re6st/tests/test_network/re6st_wrap.py
+3
-2
re6st/tests/test_network/test_net.py
re6st/tests/test_network/test_net.py
+2
-0
No files found.
re6st/tests/test_end2end/test_registry_client.py
View file @
8dea5c16
...
@@ -29,12 +29,12 @@ class TestRegistryClientInteract(unittest.TestCase):
...
@@ -29,12 +29,12 @@ class TestRegistryClientInteract(unittest.TestCase):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
re6st_wrap
.
initial
()
# if running in net ns, set lo up
# if running in net ns, set lo up
subprocess
.
check_call
((
"ip"
,
"link"
,
"set"
,
"lo"
,
"up"
))
subprocess
.
check_call
((
"ip"
,
"link"
,
"set"
,
"lo"
,
"up"
))
def
setUp
(
self
):
def
setUp
(
self
):
re6st_wrap
.
initial
()
self
.
port
=
18080
self
.
port
=
18080
self
.
url
=
"http://localhost:{}/"
.
format
(
self
.
port
)
self
.
url
=
"http://localhost:{}/"
.
format
(
self
.
port
)
# not important, used in network_config check
# not important, used in network_config check
...
...
re6st/tests/test_network/re6st_wrap.py
View file @
8dea5c16
...
@@ -29,8 +29,9 @@ RE6ST_CONF = PYTHON + " -m re6st.cli.conf"
...
@@ -29,8 +29,9 @@ RE6ST_CONF = PYTHON + " -m re6st.cli.conf"
def
initial
():
def
initial
():
"""create the workplace"""
"""create the workplace"""
if
not
WORK_DIR
.
exists
():
if
WORK_DIR
.
exists
():
WORK_DIR
.
mkdir
()
shutil
.
rmtree
(
str
(
WORK_DIR
))
WORK_DIR
.
mkdir
()
def
ip_to_serial
(
ip6
):
def
ip_to_serial
(
ip6
):
"""convert ipv6 address to serial"""
"""convert ipv6 address to serial"""
...
...
re6st/tests/test_network/test_net.py
View file @
8dea5c16
...
@@ -57,6 +57,8 @@ class TestNet(unittest.TestCase):
...
@@ -57,6 +57,8 @@ class TestNet(unittest.TestCase):
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
"""create work dir"""
"""create work dir"""
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
def
setUp
(
self
):
re6st_wrap
.
initial
()
re6st_wrap
.
initial
()
def
deploy_re6st
(
self
,
nm
,
recreate
=
False
):
def
deploy_re6st
(
self
,
nm
,
recreate
=
False
):
...
...
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