diff options
Diffstat (limited to 'sdnvpn/test/functest')
-rw-r--r-- | sdnvpn/test/functest/run_tests.py | 19 | ||||
-rw-r--r-- | sdnvpn/test/functest/testcase_3.py | 4 |
2 files changed, 11 insertions, 12 deletions
diff --git a/sdnvpn/test/functest/run_tests.py b/sdnvpn/test/functest/run_tests.py index 1130759..140aee2 100644 --- a/sdnvpn/test/functest/run_tests.py +++ b/sdnvpn/test/functest/run_tests.py @@ -20,13 +20,7 @@ import functest.utils.functest_utils as ft_utils from sdnvpn.lib import config as sdnvpn_config -parser = argparse.ArgumentParser() -parser.add_argument("-r", "--report", - help="Create json result file", - action="store_true") -args = parser.parse_args() - -logger = ft_logger.Logger("sdnvpn-run-tests").getLogger() +logger = ft_logger.Logger(__name__).getLogger() COMMON_CONFIG = sdnvpn_config.CommonConfig() TEST_DB_URL = COMMON_CONFIG.test_db @@ -42,7 +36,7 @@ def push_results(testname, start_time, end_time, criteria, details): details) -def main(): +def main(report=False): # Workaround for https://jira.opnfv.org/projects/SDNVPN/issues/SDNVPN-100 # and SDNVPN-126 cmd_line = "neutron quota-update --subnet -1 --network -1 --port -1" @@ -88,7 +82,7 @@ def main(): if status == "FAIL": overall_status = "FAIL" - if args.report: + if report: push_results( test_name_db, start_time, end_time, status, details) @@ -99,4 +93,9 @@ def main(): if __name__ == '__main__': - main() + parser = argparse.ArgumentParser() + parser.add_argument("-r", "--report", + help="Create json result file", + action="store_true") + args = parser.parse_args() + main(report=args.report) diff --git a/sdnvpn/test/functest/testcase_3.py b/sdnvpn/test/functest/testcase_3.py index b7df013..09e71bd 100644 --- a/sdnvpn/test/functest/testcase_3.py +++ b/sdnvpn/test/functest/testcase_3.py @@ -138,8 +138,8 @@ def main(): if not os.path.isfile(COMMON_CONFIG.ubuntu_image_path): logger.info("Downloading image") ft_utils.download_url( - "https://cloud-images.ubuntu.com/releases/16.04/" - "release/ubuntu-16.04-server-cloudimg-amd64-disk1.img", + "http://artifacts.opnfv.org/sdnvpn/" + "ubuntu-16.04-server-cloudimg-amd64-disk1.img", "/home/opnfv/functest/data/") else: logger.info("Using old image") |