diff options
author | Edyta Krukowska <edyta.krukowska@nokia.com> | 2020-08-19 12:34:49 +0200 |
---|---|---|
committer | Michal Banka <michal.banka@nokia.com> | 2020-08-20 11:49:37 +0200 |
commit | 4236d2f7dca97b175c757a7cea2a69e8946e3523 (patch) | |
tree | 0aff831398315a321abae49dcdca8b3447a4a254 /tests/dcaegen2/testcases/resources/robot_library | |
parent | 593176002156698f7c9e080594d53749bf91994d (diff) |
Added csit tests for StndDefined disabled validation
Issue-ID: DCAEGEN2-2254
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Change-Id: I806648d8d746dc1b9e999b967ca28e66c43c6852
Diffstat (limited to 'tests/dcaegen2/testcases/resources/robot_library')
-rw-r--r-- | tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py b/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py index a467431f..d5dd9721 100644 --- a/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py +++ b/tests/dcaegen2/testcases/resources/robot_library/DcaeLibrary.py @@ -18,37 +18,37 @@ class DcaeLibrary(object): def __init__(self): pass - + @staticmethod - def enable_vesc_with_cert_basic_auth(): + def override_collector_properties(properties_path): global client if 'Windows' in platform.system(): try: - DcaeLibrary.enable_https_auth_for_windows_platform_system() + DcaeLibrary.change_properties_for_windows_platform_system(properties_path) finally: client.close() return - DcaeLibrary.enable_https_auth_for_non_windows_platform_system() + DcaeLibrary.change_properties_for_non_windows_platform_system(properties_path) return @staticmethod - def enable_https_auth_for_non_windows_platform_system(): + def change_properties_for_non_windows_platform_system(properties_path): ws = os.environ['WORKSPACE'] - script2run = ws + "/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh" + script2run = ws + '/tests/dcaegen2/testcases/resources/override_collector_properties.sh' logger.info("Running script: " + script2run) logger.console("Running script: " + script2run) - subprocess.call(script2run) + subprocess.call([script2run, properties_path]) time.sleep(5) @staticmethod - def enable_https_auth_for_windows_platform_system(): + def change_properties_for_windows_platform_system(properties_path): global client client = paramiko.SSHClient() client.load_system_host_keys() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(os.environ['CSIT_IP'], port=22, username=os.environ['CSIT_USER'], password=os.environ['CSIT_PD']) stdin, stdout, stderr = client.exec_command( - '%{WORKSPACE}/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh') + '%{WORKSPACE}' + '/tests/dcaegen2/testcases/resources/override_collector_properties.sh', properties_path) logger.console(stdout.read()) @staticmethod |