Mercurial > hg > orthanc-tests
comparison NewTests/main.py @ 475:fe37cf5e9c02
force docker volume rm
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 03 May 2022 15:24:16 +0200 |
parents | 6917a26881ed |
children | 73d41c681568 |
comparison
equal
deleted
inserted
replaced
474:6917a26881ed | 475:fe37cf5e9c02 |
---|---|
18 if __name__ == '__main__': | 18 if __name__ == '__main__': |
19 | 19 |
20 parser = argparse.ArgumentParser(description='Executes Orthanc integration tests.') | 20 parser = argparse.ArgumentParser(description='Executes Orthanc integration tests.') |
21 parser.add_argument('-k', '--pattern', dest='test_name_patterns', action='append', type=str, help='a test pattern (ex: Housekeeper.toto') | 21 parser.add_argument('-k', '--pattern', dest='test_name_patterns', action='append', type=str, help='a test pattern (ex: Housekeeper.toto') |
22 parser.add_argument('--orthanc_under_tests_hostname', type=str, default="localhost", help="orthanc under tests hostname") | 22 parser.add_argument('--orthanc_under_tests_hostname', type=str, default="localhost", help="orthanc under tests hostname") |
23 parser.add_argument('--orthanc_under_tests_http_port', type=int, default=8042, help="orthanc under tests HTTP port") | 23 parser.add_argument('--orthanc_under_tests_http_port', type=int, default=8052, help="orthanc under tests HTTP port") |
24 parser.add_argument('--orthanc_under_tests_dicom_port', type=int, default=4252, help="orthanc under tests DICOM port") | |
24 parser.add_argument('--orthanc_under_tests_exe', type=str, default=None, help="path to the orthanc executable (if it must be launched by this script)") | 25 parser.add_argument('--orthanc_under_tests_exe', type=str, default=None, help="path to the orthanc executable (if it must be launched by this script)") |
25 parser.add_argument('--orthanc_previous_version_exe', type=str, default=None, help="path to the orthanc executable used to prepare previous version of storage/db (if it must be launched by this script and if different from orthanc_under_tests_exe)") | 26 parser.add_argument('--orthanc_previous_version_exe', type=str, default=None, help="path to the orthanc executable used to prepare previous version of storage/db (if it must be launched by this script and if different from orthanc_under_tests_exe)") |
26 parser.add_argument('--orthanc_under_tests_docker_image', type=str, default=None, help="Docker image of the orthanc under tests (if it must be launched by this script)") | 27 parser.add_argument('--orthanc_under_tests_docker_image', type=str, default=None, help="Docker image of the orthanc under tests (if it must be launched by this script)") |
27 parser.add_argument('--orthanc_previous_version_docker_image', type=str, default=None, help="Docker image of the orthanc version used to prepare previous version of storage/db (if it must be launched by this script)") | 28 parser.add_argument('--orthanc_previous_version_docker_image', type=str, default=None, help="Docker image of the orthanc version used to prepare previous version of storage/db (if it must be launched by this script)") |
28 parser.add_argument('--skip_preparation', action='store_true', help="if this is a multi stage tests with preparations, skip the preparation") | 29 parser.add_argument('--skip_preparation', action='store_true', help="if this is a multi stage tests with preparations, skip the preparation") |
35 loader = unittest.TestLoader() | 36 loader = unittest.TestLoader() |
36 loader.testNamePatterns = args.test_name_patterns | 37 loader.testNamePatterns = args.test_name_patterns |
37 | 38 |
38 Helpers.orthanc_under_tests_hostname = args.orthanc_under_tests_hostname | 39 Helpers.orthanc_under_tests_hostname = args.orthanc_under_tests_hostname |
39 Helpers.orthanc_under_tests_http_port = args.orthanc_under_tests_http_port | 40 Helpers.orthanc_under_tests_http_port = args.orthanc_under_tests_http_port |
41 Helpers.orthanc_under_tests_dicom_port = args.orthanc_under_tests_dicom_port | |
40 Helpers.plugins = args.plugins | 42 Helpers.plugins = args.plugins |
41 | 43 |
42 Helpers.orthanc_under_tests_exe = args.orthanc_under_tests_exe | 44 Helpers.orthanc_under_tests_exe = args.orthanc_under_tests_exe |
43 Helpers.orthanc_under_tests_docker_image = args.orthanc_under_tests_docker_image | 45 Helpers.orthanc_under_tests_docker_image = args.orthanc_under_tests_docker_image |
44 | 46 |