Bug correction for the ethernet loop test 40/100140/3
authorChristophe Betoule <christophe.betoule@orange.com>
Fri, 11 Mar 2022 15:03:38 +0000 (16:03 +0100)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Mon, 21 Mar 2022 08:05:42 +0000 (08:05 +0000)
- 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 <christophe.betoule@orange.com>
Change-Id: I10752117a2e096a3a0ee8b8c81a8c4be654e8cf1

tests/transportpce_tests/2.2.1/test12_end2end.py

index 090cd536ee2c5acc0b21cc8e4430b8493ec42bf4..3fb243f5c70b01fa7a129d8729873693ca5b8311 100644 (file)
@@ -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")