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
8e698acc
Commit
8e698acc
authored
May 24, 2022
by
zhifan huang
Committed by
Xiaowu Zhang
Aug 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(net): add a simple test for restart
parent
7095c4bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
re6st/tests/test_network/test_net.py
re6st/tests/test_network/test_net.py
+20
-0
No files found.
re6st/tests/test_network/test_net.py
View file @
8e698acc
...
@@ -122,6 +122,26 @@ class TestNet(unittest.TestCase):
...
@@ -122,6 +122,26 @@ class TestNet(unittest.TestCase):
self
.
assertTrue
(
wait_stable
(
nodes
,
400
),
"network can't recover"
)
self
.
assertTrue
(
wait_stable
(
nodes
,
400
),
"network can't recover"
)
def
test_reboot_one_machine_router
(
self
):
"""create a network router, wait the net stable, reboot on machine,
then test if network recover,
"""
nm
=
network_build
.
net_route
()
nodes
,
_
=
deploy_re6st
(
nm
)
wait_stable
(
nodes
,
40
)
# stop on machine randomly
index
=
int
(
random
.
random
()
*
2
)
+
1
machine
=
nodes
[
index
]
machine
.
stop
()
time
.
sleep
(
5
)
machine
.
run
(
"-i"
+
machine
.
node
.
iface
.
name
)
logging
.
info
(
"restart %s"
,
machine
.
name
)
self
.
assertTrue
(
wait_stable
(
nodes
,
100
),
"network can't recover"
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
logging
.
basicConfig
(
level
=
logging
.
DEBUG
,
filename
=
'test.log'
,
filemode
=
'w'
,
logging
.
basicConfig
(
level
=
logging
.
DEBUG
,
filename
=
'test.log'
,
filemode
=
'w'
,
...
...
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