From 0e614d530b753a0b255e645b281b0e6d20c0bd53 Mon Sep 17 00:00:00 2001 From: Sangwook Ha Date: Thu, 26 Jan 2023 11:10:38 -0800 Subject: [PATCH] Use karaf client batch mode 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 --- tests/transportpce_tests/common/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/transportpce_tests/common/test_utils.py b/tests/transportpce_tests/common/test_utils.py index 75c523abf..490ea04d8 100644 --- a/tests/transportpce_tests/common/test_utils.py +++ b/tests/transportpce_tests/common/test_utils.py @@ -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) -- 2.36.6