Extend test cases to use outputs_to_working_dir and metadata_strategy extended

This commit is contained in:
mvdbeek
2020-08-13 12:16:41 +02:00
parent ef33e91b6c
commit 2b1d29cdcf
3 changed files with 11 additions and 4 deletions
@@ -112,8 +112,7 @@ class BaseObjectstoreUploadTest(UploadTestDatatypeDataTestCase):
temp_directory = cls._test_driver.mkdtemp()
cls.object_stores_parent = temp_directory
cls.object_store_config_path = os.path.join(temp_directory, "object_store_conf.xml")
# This doesn't quite work yet, fails with extra_files_path
# config["metadata_strategy"] = "extended"
config["metadata_strategy"] = "extended"
config["outpus_to_working_dir"] = True
config["retry_metadata_internally"] = False
config["object_store_store_by"] = "uuid"
@@ -44,6 +44,9 @@ class ObjectStoreSelectionIntegrationTestCase(BaseObjectStoreIntegrationTestCase
cls._configure_object_store(DISTRIBUTED_OBJECT_STORE_CONFIG_TEMPLATE, config)
config["job_config_file"] = JOB_CONFIG_FILE
config["job_resource_params_file"] = JOB_RESOURCE_PARAMETERS_CONFIG_FILE
config["object_store_store_by"] = "uuid"
config["metadata_strategy"] = "extended"
config["outputs_to_working_directory"] = True
def _object_store_counts(self):
files_default_count = files_count(self.files_default_path)
@@ -61,6 +64,11 @@ class ObjectStoreSelectionIntegrationTestCase(BaseObjectStoreIntegrationTestCase
assert dynamic_ebs == files_dynamic_ebs_count
assert dynamic_s3 == files_dynamic_s3_count
def _assert_no_external_filename(self):
# Should maybe be its own test case ...
for external_filename_tuple in self._app.model.session.query(self._app.model.Dataset.external_filename).all():
assert external_filename_tuple[0] is None
def test_tool_simple_constructs(self):
with self.dataset_populator.test_history() as history_id:
@@ -103,3 +111,4 @@ class ObjectStoreSelectionIntegrationTestCase(BaseObjectStoreIntegrationTestCase
}
_run_tool("create_10", create_10_inputs)
self._assert_file_counts(1, 2, 10, 10)
self._assert_no_external_filename()
@@ -89,8 +89,7 @@ class SwiftObjectStoreIntegrationTestCase(integration_util.IntegrationTestCase):
cls.object_stores_parent = temp_directory
config_path = os.path.join(temp_directory, "object_store_conf.xml")
config["object_store_store_by"] = "uuid"
# This doesn't quite work yet, fails with extra_files_path
# config["metadata_strategy"] = "extended"
config["metadata_strategy"] = "extended"
config["outpus_to_working_dir"] = True
config["retry_metadata_internally"] = False
with open(config_path, "w") as f: