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
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
Roque
slapos
Commits
c16a8274
Commit
c16a8274
authored
Feb 13, 2024
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/end-to-end-testing: ensure cleanup
parent
10cef4df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
49 deletions
+63
-49
software/end-to-end-testing/tests/test_lopcomm.py
software/end-to-end-testing/tests/test_lopcomm.py
+32
-25
software/end-to-end-testing/tests/test_ors.py
software/end-to-end-testing/tests/test_ors.py
+31
-24
No files found.
software/end-to-end-testing/tests/test_lopcomm.py
View file @
c16a8274
...
@@ -6,6 +6,7 @@ from websocket import create_connection
...
@@ -6,6 +6,7 @@ from websocket import create_connection
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
try
:
super
().
setUpClass
()
super
().
setUpClass
()
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-cb003-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-cb003-enb-%Y-%B-%d-%H:%M:%S'
)
...
@@ -32,6 +33,12 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
...
@@ -32,6 +33,12 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
except
Exception
as
e
:
cls
.
logger
.
error
(
"Error during setup: "
+
str
(
e
))
# Ensure cleanup
cls
.
tearDownClass
()
raise
@
classmethod
@
classmethod
def
retry_request
(
cls
,
func
,
*
args
,
**
kwargs
):
def
retry_request
(
cls
,
func
,
*
args
,
**
kwargs
):
for
attempt
in
range
(
cls
.
max_retries
):
for
attempt
in
range
(
cls
.
max_retries
):
...
...
software/end-to-end-testing/tests/test_ors.py
View file @
c16a8274
...
@@ -6,6 +6,7 @@ from websocket import create_connection
...
@@ -6,6 +6,7 @@ from websocket import create_connection
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
try
:
super
().
setUpClass
()
super
().
setUpClass
()
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-ors84-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-ors84-enb-%Y-%B-%d-%H:%M:%S'
)
...
@@ -31,6 +32,12 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
...
@@ -31,6 +32,12 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
except
Exception
as
e
:
cls
.
logger
.
error
(
"Error during setup: "
+
str
(
e
))
# Ensure cleanup
cls
.
tearDownClass
()
raise
@
classmethod
@
classmethod
def
retry_request
(
cls
,
func
,
*
args
,
**
kwargs
):
def
retry_request
(
cls
,
func
,
*
args
,
**
kwargs
):
for
attempt
in
range
(
cls
.
max_retries
):
for
attempt
in
range
(
cls
.
max_retries
):
...
...
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