diff --git a/tests/integration/depo_asserts.py b/tests/integration/depo_asserts.py deleted file mode 100644 index 29ec5358ca0787d208f97bd852c7653f586a9de1..0000000000000000000000000000000000000000 --- a/tests/integration/depo_asserts.py +++ /dev/null @@ -1,61 +0,0 @@ -import os -import unittest - -from integration.integration_test_utils import IntegrationTestUtils -from integration.test_deposition import TestDeposition - - -class DepoAsserts(TestDeposition): - - - def test_standard_run_input_status_success(self): - status_file_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, "STATUS_SUCCESS") - success_file_exists: bool = os.path.isfile(status_file_path) - self.assertTrue(success_file_exists) - - - def test_standard_run_input_all_regions_ran(self): - """ - working on the assumption that if there are images for each region, it must have run through - (at least past the region iteration) - """ - - east_africa_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, - "plotting", "eastafrica", "images", "Weekly", - "deposition_eastafrica_leaf_rust_total_202210010000_202210080000_map.png") - ethiopia_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, - "plotting", "ethiopia", "images", "Weekly", - "deposition_ethiopia_leaf_rust_total_202210010000_202210080000_map.png") - - ea_file_exists: bool = os.path.isfile(east_africa_image_path) - eth_file_exists: bool = os.path.isfile(ethiopia_image_path) - self.assertTrue(ea_file_exists) - self.assertTrue(eth_file_exists) - - - def test_standard_run_all_input_csvs_produced(self): - east_africa_csv_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, - "plotting", "eastafrica", "input_csvs", "*.csv") - ethiopia_csv_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, - "plotting", "ethiopia", "input_csvs", "*.csv") - - ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path) - eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_csv_path) - self.assertEqual(9, ea_csv_count) - self.assertEqual(27, eth_csv_count) - - - def test_standard_run_all_images_produced(self): - east_africa_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, - "plotting", "eastafrica", "images", "Weekly", "*.png") - ethiopia_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, - "plotting", "ethiopia", "images", "Weekly", "*.png") - - ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_image_path) - eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_image_path) - self.assertEqual(3, ea_csv_count) - self.assertEqual(6, eth_csv_count) - - -if __name__ == '__main__': - unittest.main() diff --git a/tests/integration/test_epi.py b/tests/integration/test_epi.py index 18d406d9c5879288bd4f2cc864b5a10743efac48..6822d2c61a7ccf2e745d2078203221c5e6ebc229 100644 --- a/tests/integration/test_epi.py +++ b/tests/integration/test_epi.py @@ -21,8 +21,8 @@ class TestEpi(unittest.TestCase): @staticmethod def write_temp_run_config_files(): nowstring: str = IntegrationTestUtils.get_now_string() - prefix: str = "temp_epi_" + nowstring - # prefix: str = "" + # prefix: str = "temp_epi_" + nowstring + prefix: str = "" default_config = IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH default_config_dict: dict = IntegrationTestUtils.load_json_file(default_config) diff --git a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/example_depo_run.zip b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/example_depo_run.zip deleted file mode 100644 index 2636f5c3fa8904c22ed743e7e635026cdcde9f1e..0000000000000000000000000000000000000000 Binary files a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/example_depo_run.zip and /dev/null differ diff --git a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json index 8a3f60eec6f4ae52d5e5241d9d09569bff4bc2b9..b6217dc951b5c6d398f64e1f8dc6e83c90d752e8 100644 --- a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json +++ b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json @@ -6,7 +6,7 @@ "WorkspacePathout" : "../test_data/test_deployment/regions/EastAfrica/workspace/", "WorkspacePath" : "set_in_the_code", "ResourcesPath" : "../test_data/test_deployment/regions/EastAfrica/resources/", - "ServerPath" : "/storage/moved/Ethiopia/", + "ServerPath" : "OVERRIDDEN", "ServerName" : "ewsmanager@willow.csx.cam.ac.uk", "ServerKey" : "not used, set to empty string in tests", "Survey" : { @@ -17,7 +17,7 @@ "SeasonStartString" : "20220930", "SkipServerDownload" : true, "ServerCredentialsFile" : "../test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/Cred-ODK-EIAR.json", - "ServerPathExtra" : "/storage/sftp/metofficeupload/upload/Ethiopia/toMO/", + "ServerPathExtra" : "OVERRIDDEN", "FormEdits" : { "wheat_rust_survey_1_0" : {}, "akpyJHvYxkLKPkxFJnPyTW" : { @@ -124,7 +124,7 @@ } }, "Deposition" : { - "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/Ethiopia/fromMO/daily_name/", + "ServerPathTemplate" : "OVERRIDDEN", "InputFileTemplate" : "WR_NAME_Ethiopia_${StartString}_fc", "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800",