dev_test = {dev_test} """ cfg_file = open("auto_config.py", 'w') cfg_file.writelines(cfg_content) cfg_file.close() from functions import setup_ssh_agent, create_key, add_ssh_key, get_file from functions import SSH_TEST # Setup ssh agent before starting test. setup_ssh_agent() if os.path.isdir(dotsshPath) is False: os.makedirs(dotsshPath) if os.path.exists(keyPath) is False: create_key(keyPath) add_ssh_key(keyPath) f = open(keyPath + '.pub', 'r') Key = f.readlines()[0].rstrip() cfg_file = open("auto_config.py", 'a') cfg_file.writelines(f'sshKey = "{Key}"\n') cfg_file.close() call([ f"pytest-{version}", "-v", "-o", "junit_family=xunit2", "--junitxml", 'results/api_v2_tests_result.xml', f"api2/{testName}" ]) # get useful logs artifacts = f"{workdir}/artifacts/"
results_xml = "%s" """ % (passwd, ip, api, interface, localHome, disk, keyPath, results_xml) cfg_file = open("auto_config.py", 'w') cfg_file.writelines(cfg_content) cfg_file.close() from functions import setup_ssh_agent, create_key, add_ssh_key # Setup ssh agent befor starting test. setup_ssh_agent() if path.isdir(dotsshPath) is False: makedirs(dotsshPath) if path.exists(keyPath) is False: create_key(keyPath) add_ssh_key(keyPath) f = open(keyPath + '.pub', 'r') Key = f.readlines()[0].rstrip() cfg_file = open("auto_config.py", 'a') cfg_file.writelines('sshKey = "%s"\n' % Key) cfg_file.close() def get_tests(): rv = [] skip_tests = [] if api == '1.0': skip_tests = ['bootenv', 'jails', 'alerts', 'smarttest']