Commit c16a8274 authored by Lu Xu's avatar Lu Xu 👀

software/end-to-end-testing: ensure cleanup

parent 10cef4df
Pipeline #32775 failed with stage
in 0 seconds
...@@ -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):
......
...@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment