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
Paul Graydon
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
Hide 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,31 +6,38 @@ from websocket import create_connection
...
@@ -6,31 +6,38 @@ from websocket import create_connection
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
super
().
setUpClass
()
try
:
super
().
setUpClass
()
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-cb003-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
cn_instance_name
=
time
.
strftime
(
'e2e-cb003-core-network-%Y-%B-%d-%H:%M:%S'
)
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-cb003-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
sim_instance_name
=
time
.
strftime
(
'e2e-cb003-sim-%Y-%B-%d-%H:%M:%S'
)
cls
.
cn_instance_name
=
time
.
strftime
(
'e2e-cb003-core-network-%Y-%B-%d-%H:%M:%S'
)
cls
.
ue_instance_name
=
time
.
strftime
(
'e2e-sb005-ue-%Y-%B-%d-%H:%M:%S'
)
cls
.
sim_instance_name
=
time
.
strftime
(
'e2e-cb003-sim-%Y-%B-%d-%H:%M:%S'
)
cls
.
ue_instance_name
=
time
.
strftime
(
'e2e-sb005-ue-%Y-%B-%d-%H:%M:%S'
)
cls
.
product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
cls
.
ue_product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
cls
.
product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
cls
.
ue_product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
# Component GUIDs and configurations
cls
.
comp_enb
=
"COMP-3920"
# Component GUIDs and configurations
cls
.
comp_cn
=
"COMP-3920"
cls
.
comp_enb
=
"COMP-3920"
cls
.
comp_ue
=
"COMP-3756"
cls
.
comp_cn
=
"COMP-3920"
cls
.
dl_earfcn
=
300
cls
.
comp_ue
=
"COMP-3756"
cls
.
dl_earfcn
=
300
# Retry configurations
cls
.
max_retries
=
10
# Retry configurations
cls
.
retry_delay
=
180
# seconds
cls
.
max_retries
=
10
cls
.
retry_delay
=
180
# seconds
# Setup instances
cls
.
setup_instances
()
# Setup instances
cls
.
setup_instances
()
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
cls
.
waitUntilGreen
(
cls
.
enb_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
):
...
...
software/end-to-end-testing/tests/test_ors.py
View file @
c16a8274
...
@@ -6,30 +6,37 @@ from websocket import create_connection
...
@@ -6,30 +6,37 @@ from websocket import create_connection
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
super
().
setUpClass
()
try
:
super
().
setUpClass
()
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-ors84-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
cn_instance_name
=
time
.
strftime
(
'e2e-ors84-core-network-%Y-%B-%d-%H:%M:%S'
)
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-ors84-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
sim_instance_name
=
time
.
strftime
(
'e2e-ors84-sim-%Y-%B-%d-%H:%M:%S'
)
cls
.
cn_instance_name
=
time
.
strftime
(
'e2e-ors84-core-network-%Y-%B-%d-%H:%M:%S'
)
cls
.
ue_instance_name
=
time
.
strftime
(
'e2e-simbox005-ue-%Y-%B-%d-%H:%M:%S'
)
cls
.
sim_instance_name
=
time
.
strftime
(
'e2e-ors84-sim-%Y-%B-%d-%H:%M:%S'
)
cls
.
product
=
cls
.
product
.
get
(
'ors-tdd'
)
cls
.
ue_instance_name
=
time
.
strftime
(
'e2e-simbox005-ue-%Y-%B-%d-%H:%M:%S'
)
cls
.
ue_product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
cls
.
product
=
cls
.
product
.
get
(
'ors-tdd'
)
cls
.
ue_product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
# Component GUIDs and configurations
cls
.
comp_enb
=
"COMP-4057"
# Component GUIDs and configurations
cls
.
comp_cn
=
"COMP-4057"
cls
.
comp_enb
=
"COMP-4057"
cls
.
comp_ue
=
"COMP-3756"
cls
.
comp_cn
=
"COMP-4057"
cls
.
dl_earfcn
=
38550
cls
.
comp_ue
=
"COMP-3756"
cls
.
dl_earfcn
=
38550
# Retry configurations
cls
.
max_retries
=
10
# Retry configurations
cls
.
retry_delay
=
180
# seconds
cls
.
max_retries
=
10
cls
.
retry_delay
=
180
# seconds
# Setup instances
cls
.
setup_instances
()
# Setup instances
cls
.
setup_instances
()
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
cls
.
waitUntilGreen
(
cls
.
enb_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
):
...
...
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