diff --git a/tests/integration/partial/integration_test_utils.py b/tests/integration/partial/integration_test_utils.py index 9aa4bbdddc3e5d2175898c0c5a128a3dffe19af5..5b17c3d739cd34a5bd251323999ff130785fdc80 100644 --- a/tests/integration/partial/integration_test_utils.py +++ b/tests/integration/partial/integration_test_utils.py @@ -56,6 +56,17 @@ class IntegrationTestUtils: test_prefix: str, processor_dir: str) -> bool: + """ + Runs the full integration tests on the production server GitlabRunner. The full integration tests are run on + a GitlabRunner that runs on the production server, and mounts the local file system to use the production + configuration files. + + :param test_case: + :param test_prefix: + :param processor_dir: + :return: + """ + _parser = IntegrationTestUtils.build_arg_parser() _args = _parser.parse_args() @@ -90,7 +101,7 @@ class IntegrationTestUtils: runner = HTMLTestRunner(output = _test_report_dir, combine_reports = True) result: TestResult = runner.run(tests) - return True + return result.wasSuccessful() @staticmethod @@ -153,19 +164,25 @@ class IntegrationTestUtils: return file_exists and file_not_empty @staticmethod - def run_unittest_pipeline(component: str, - start_date: str, - **kwargs): + def run_partial_integration_test_pipeline(component: str, + start_date: str, + **kwargs): - print("running unittest pipeline1") + """ + Runs the "run_Process" function in Processor.py with the given arguments for the partial integration tests. + The full integration pipeline is run in the "run_full_integration_test_pipeline" function. + + :param component: + :param start_date: + :param kwargs: + :return: + """ # need EMAIL_CRED in the environment before we import Processor os.environ["EMAIL_CRED"] = IntegrationTestUtils.EMAIL_CRED_PATH - print("running unittest pipeline2") import Processor reload(Processor) from Processor import run_Process, set_log_level - print("running unittest pipeline3") args_dict: dict = {} @@ -185,8 +202,7 @@ class IntegrationTestUtils: set_log_level(log_level) try: - print("running process") - # run_Processsdsdsd(args_dict) + run_Process(args_dict) except SystemExit: # we will eventually want to throw these to the calling class to be dealt with pass diff --git a/tests/integration/partial/test_advisory.py b/tests/integration/partial/test_advisory.py index 686433489658d23b01904348d11a797d2fc9fbec..fdf585dac3d170e5aec87948a3f724e77f792835 100644 --- a/tests/integration/partial/test_advisory.py +++ b/tests/integration/partial/test_advisory.py @@ -68,7 +68,7 @@ class TestAdvisory(BaseAdvisoryTestSuite.AdvisoryTestSuite): @staticmethod def run_advisory_pipeline(): component = 'Advisory' - IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.TEST_START_DATE) + IntegrationTestUtils.run_partial_integration_test_pipeline(component, IntegrationTestUtils.TEST_START_DATE) if __name__ == '__main__': diff --git a/tests/integration/partial/test_deposition.py b/tests/integration/partial/test_deposition.py index 9655d4168acbaf13ca4050ad7871ee79b8734414..ace57114737eacac6385602e4f0976b341d34997 100644 --- a/tests/integration/partial/test_deposition.py +++ b/tests/integration/partial/test_deposition.py @@ -63,7 +63,7 @@ class TestDeposition(BaseDepoTestSuite.DepoTestSuite): @staticmethod def run_depo_pipeline(): component = 'Deposition' - IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.TEST_START_DATE) + IntegrationTestUtils.run_partial_integration_test_pipeline(component, IntegrationTestUtils.TEST_START_DATE) if __name__ == '__main__': diff --git a/tests/integration/partial/test_env_suit.py b/tests/integration/partial/test_env_suit.py index 57a7612120e1d87ccdebb25fd69e066f184c4201..44d6e6b62d8c0474ae6b33ccdf4ced6b4cf1dc9e 100644 --- a/tests/integration/partial/test_env_suit.py +++ b/tests/integration/partial/test_env_suit.py @@ -69,7 +69,7 @@ class TestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite): component = 'Environment' print("running unittest pipeline0") - # IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.TEST_START_DATE) + IntegrationTestUtils.run_partial_integration_test_pipeline(component, IntegrationTestUtils.TEST_START_DATE) if __name__ == '__main__': diff --git a/tests/integration/partial/test_epi.py b/tests/integration/partial/test_epi.py index f1e1d74f603d6f9faa186f776cf8777a8a2d1d45..9a2b19dd7ee2463279498e2b30d47f8819855d18 100644 --- a/tests/integration/partial/test_epi.py +++ b/tests/integration/partial/test_epi.py @@ -67,7 +67,7 @@ class TestEpi(BaseEpiTestSuite.EpiTestSuite): @staticmethod def run_epi_pipeline(): component = 'Epidemiology' - IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.TEST_START_DATE) + IntegrationTestUtils.run_partial_integration_test_pipeline(component, IntegrationTestUtils.TEST_START_DATE) if __name__ == '__main__': diff --git a/tests/integration/partial/test_survey.py b/tests/integration/partial/test_survey.py index 2581702c11a674201efabd05b70907e11c2559ad..a770fed939f046e069d6fe97165dcf7ad601dfdd 100644 --- a/tests/integration/partial/test_survey.py +++ b/tests/integration/partial/test_survey.py @@ -64,7 +64,7 @@ class TestSurvey(BaseSurveyTestSuite.SurveyTestSuite): @staticmethod def run_survey_pipeline(): component = 'Survey' - IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.TEST_START_DATE) + IntegrationTestUtils.run_partial_integration_test_pipeline(component, IntegrationTestUtils.TEST_START_DATE) if __name__ == '__main__':