Use karaf client batch mode 78/104178/3
authorSangwook Ha <sangwook.ha@verizon.com>
Thu, 26 Jan 2023 19:10:38 +0000 (11:10 -0800)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Sat, 28 Jan 2023 09:15:55 +0000 (09:15 +0000)
Karaf 'client' command has a batch mode option ('-b') to take commands
from stdin without requiring TTY. Hence this option makes it possible
to run the command without getting affected by the Karaf terminal
property setup issue.

JIRA: TRNSPRTPCE-701
Change-Id: I885df3ee97fd528e151edcf98bb648ac9ebb2cc5
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
tests/transportpce_tests/common/test_utils.py

index 75c523abf9fc7da3ff7fb41560b3091890e9c18e..490ea04d87035e878a889703a78c95472c3c6a37 100644 (file)
@@ -198,7 +198,7 @@ def install_karaf_feature(feature_name: str):
     executable = os.path.join(
         os.path.dirname(os.path.realpath(__file__)),
         '..', '..', '..', KARAF_INSTALLDIR, 'target', 'assembly', 'bin', 'client')
-    return subprocess.run([executable],
+    return subprocess.run([executable, '-b'],
                           input='feature:install ' + feature_name + '\n feature:list | grep '
                           + feature_name + ' \n logout \n',
                           universal_newlines=True, check=False)