From 04ad72aa855e5792e04eb3a9fb912bf5d19d0604 Mon Sep 17 00:00:00 2001 From: Christophe Betoule Date: Fri, 11 Mar 2022 16:03:38 +0100 Subject: [PATCH] Bug correction for the ethernet loop test - Adapt the body of the service request for the ethernet loop test to really create an ethernet service - Decrease the number of loops from 6 to 3 JIRA: TRNSPRTPCE-645 Signed-off-by: Christophe Betoule Change-Id: I10752117a2e096a3a0ee8b8c81a8c4be654e8cf1 --- .../2.2.1/test12_end2end.py | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/tests/transportpce_tests/2.2.1/test12_end2end.py b/tests/transportpce_tests/2.2.1/test12_end2end.py index 090cd536e..3fb243f5c 100644 --- a/tests/transportpce_tests/2.2.1/test12_end2end.py +++ b/tests/transportpce_tests/2.2.1/test12_end2end.py @@ -765,36 +765,40 @@ class TransportPCEFulltesting(unittest.TestCase): self.test_34_check_topo_ROADMA_SRG1() self.test_35_check_topo_ROADMA_DEG2() - def test_49_loop_create_eth_service(self): - for i in range(1, 6): + def test_49_loop_create_oc_service(self): + for i in range(1, 3): # pylint: disable=consider-using-f-string print("iteration number {}".format(i)) - print("eth service creation") - self.test_11_create_eth_service1() + print("oc service creation") + self.test_36_create_oc_service1() print("check xc in ROADM-A1") - self.test_13_check_xc1_ROADMA() + self.test_38_check_xc1_ROADMA() print("check xc in ROADM-C1") - self.test_14_check_xc1_ROADMC() - print("eth service deletion\n") - self.test_30_delete_eth_service1() + self.test_39_check_xc1_ROADMC() + print("oc service deletion\n") + self.test_44_delete_oc_service1() - def test_50_loop_create_oc_service(self): + def test_50_loop_create_eth_service(self): response = test_utils.get_service_list_request("services/service1") - if response.status_code != 404: + if response.status_code != requests.codes.not_found: response = test_utils.service_delete_request("service1") time.sleep(5) - - for i in range(1, 6): + self.cr_serv_sample_data["input"]["connection-type"] = "service" + self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "XPDR-A1" + self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet" + self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "XPDR-C1" + self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet" + for i in range(1, 3): # pylint: disable=consider-using-f-string print("iteration number {}".format(i)) - print("oc service creation") - self.test_36_create_oc_service1() + print("eth service creation") + self.test_11_create_eth_service1() print("check xc in ROADM-A1") - self.test_38_check_xc1_ROADMA() + self.test_13_check_xc1_ROADMA() print("check xc in ROADM-C1") - self.test_39_check_xc1_ROADMC() - print("oc service deletion\n") - self.test_44_delete_oc_service1() + self.test_14_check_xc1_ROADMC() + print("eth service deletion\n") + self.test_30_delete_eth_service1() def test_51_disconnect_XPDRA(self): response = test_utils.unmount_device("XPDR-A1") -- 2.36.6