Restore TAPI feat install w/ Karaf client in tests 85/104185/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Sat, 28 Jan 2023 09:21:45 +0000 (10:21 +0100)
committerguillaume.lambert <guillaume.lambert@orange.com>
Sat, 28 Jan 2023 09:21:56 +0000 (10:21 +0100)
JIRA: TRNSPRTPCE-701
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I15eca75c9187192bf02c27f585c991c547a61d18

tests/transportpce_tests/common/test_utils.py
tests/transportpce_tests/tapi/test01_abstracted_topology.py
tests/transportpce_tests/tapi/test02_full_topology.py
tests/transportpce_tests/tapi/test03_tapi_device_change_notifications.py
tox.ini

index 490ea04d87035e878a889703a78c95472c3c6a37..fb1c39faad949643f1df79291017dc6cb2d834e5 100644 (file)
@@ -198,6 +198,8 @@ def install_karaf_feature(feature_name: str):
     executable = os.path.join(
         os.path.dirname(os.path.realpath(__file__)),
         '..', '..', '..', KARAF_INSTALLDIR, 'target', 'assembly', 'bin', 'client')
+# FIXME: https://jira.opendaylight.org/browse/TRNSPRTPCE-701
+# -b option needed below because of Karaf client bug reporte in the JIRA ticket mentioned above
     return subprocess.run([executable, '-b'],
                           input='feature:install ' + feature_name + '\n feature:list | grep '
                           + feature_name + ' \n logout \n',
index d895f989894fffab161e9a7933edbbfb885b5595..9f33dd822f3c9825818f96411a212d06ae0d57c2 100644 (file)
@@ -147,18 +147,17 @@ class TransportTapitesting(unittest.TestCase):
         os.environ['JAVA_MAX_MEM'] = '4096M'
         cls.processes = test_utils.start_tpce()
         # TAPI feature is not installed by default in Karaf
-# FIXME: https://jira.opendaylight.org/browse/TRNSPRTPCE-701
-#        if "USE_LIGHTY" not in os.environ or os.environ['USE_LIGHTY'] != 'True':
-#            print("installing tapi feature...")
-#            result = test_utils.install_karaf_feature("odl-transportpce-tapi")
-#            if result.returncode != 0:
-#                cls.init_failed = True
-#            print("Restarting OpenDaylight...")
-#            test_utils.shutdown_process(cls.processes[0])
-#            cls.processes[0] = test_utils.start_karaf()
-#            test_utils.process_list[0] = cls.processes[0]
-#            cls.init_failed = not test_utils.wait_until_log_contains(
-#                test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
+        if "USE_LIGHTY" not in os.environ or os.environ['USE_LIGHTY'] != 'True':
+            print("installing tapi feature...")
+            result = test_utils.install_karaf_feature("odl-transportpce-tapi")
+            if result.returncode != 0:
+                cls.init_failed = True
+            print("Restarting OpenDaylight...")
+            test_utils.shutdown_process(cls.processes[0])
+            cls.processes[0] = test_utils.start_karaf()
+            test_utils.process_list[0] = cls.processes[0]
+            cls.init_failed = not test_utils.wait_until_log_contains(
+                test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
         if cls.init_failed:
             print("tapi installation feature failed...")
             test_utils.shutdown_process(cls.processes[0])
index 0ab966b85308ba1cbf70263bebaca5a63326904b..64ddc4394aaf18ebb88f6ba268ba8b65b6dd6c38 100644 (file)
@@ -104,18 +104,17 @@ class TransportPCEtesting(unittest.TestCase):
         os.environ['JAVA_MAX_MEM'] = '4096M'
         cls.processes = test_utils.start_tpce()
         # TAPI feature is not installed by default in Karaf
-# FIXME: https://jira.opendaylight.org/browse/TRNSPRTPCE-701
-#        if "USE_LIGHTY" not in os.environ or os.environ['USE_LIGHTY'] != 'True':
-#            print("installing tapi feature...")
-#            result = test_utils.install_karaf_feature("odl-transportpce-tapi")
-#            if result.returncode != 0:
-#                cls.init_failed = True
-#            print("Restarting OpenDaylight...")
-#            test_utils.shutdown_process(cls.processes[0])
-#            cls.processes[0] = test_utils.start_karaf()
-#            test_utils.process_list[0] = cls.processes[0]
-#            cls.init_failed = not test_utils.wait_until_log_contains(
-#                test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
+        if "USE_LIGHTY" not in os.environ or os.environ['USE_LIGHTY'] != 'True':
+            print("installing tapi feature...")
+            result = test_utils.install_karaf_feature("odl-transportpce-tapi")
+            if result.returncode != 0:
+                cls.init_failed = True
+            print("Restarting OpenDaylight...")
+            test_utils.shutdown_process(cls.processes[0])
+            cls.processes[0] = test_utils.start_karaf()
+            test_utils.process_list[0] = cls.processes[0]
+            cls.init_failed = not test_utils.wait_until_log_contains(
+                test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
         if cls.init_failed:
             print("tapi installation feature failed...")
             test_utils.shutdown_process(cls.processes[0])
index f4b3be42e6d0756d262012a0d8eb29d5d5383020..2a4f3f2925851ee1dc588861eb8ab7db9c89c81a 100644 (file)
@@ -113,18 +113,17 @@ class TransportPCEFulltesting(unittest.TestCase):
         os.environ['JAVA_MAX_MEM'] = '4096M'
         cls.processes = test_utils.start_tpce()
         # TAPI feature is not installed by default in Karaf
-# FIXME: https://jira.opendaylight.org/browse/TRNSPRTPCE-701
-#        if "USE_LIGHTY" not in os.environ or os.environ['USE_LIGHTY'] != 'True':
-#            print("installing tapi feature...")
-#            result = test_utils.install_karaf_feature("odl-transportpce-tapi")
-#            if result.returncode != 0:
-#                cls.init_failed = True
-#            print("Restarting OpenDaylight...")
-#            test_utils.shutdown_process(cls.processes[0])
-#            cls.processes[0] = test_utils.start_karaf()
-#            test_utils.process_list[0] = cls.processes[0]
-#            cls.init_failed = not test_utils.wait_until_log_contains(
-#                test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
+        if "USE_LIGHTY" not in os.environ or os.environ['USE_LIGHTY'] != 'True':
+            print("installing tapi feature...")
+            result = test_utils.install_karaf_feature("odl-transportpce-tapi")
+            if result.returncode != 0:
+                cls.init_failed = True
+            print("Restarting OpenDaylight...")
+            test_utils.shutdown_process(cls.processes[0])
+            cls.processes[0] = test_utils.start_karaf()
+            test_utils.process_list[0] = cls.processes[0]
+            cls.init_failed = not test_utils.wait_until_log_contains(
+                test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
         if cls.init_failed:
             print("tapi installation feature failed...")
             test_utils.shutdown_process(cls.processes[0])
diff --git a/tox.ini b/tox.ini
index 34c0aa43d0ab4247cd96c12aa054f27cfee5e3a8..deea5646d773c6f368544028e8dbf826d6a65faf 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -193,7 +193,7 @@ setenv =
     OLM_TIMER2=2000
 
 commands =
-  ./add_tapi_feature_to_tests221.sh
+#  ./add_tapi_feature_to_tests221.sh
   ./launch_tests.sh tapi {posargs:}
 
 [testenv:with_docker]