From 2b1d29cdcf8fff15cd553eaa86958caac46d1bbb Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 13 Aug 2020 11:50:12 +0200 Subject: [PATCH] Extend test cases to use outputs_to_working_dir and metadata_strategy extended --- .../objectstore/test_objectstore_datatype_upload.py | 3 +-- test/integration/objectstore/test_selection.py | 9 +++++++++ test/integration/objectstore/test_swift_objectstore.py | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/integration/objectstore/test_objectstore_datatype_upload.py b/test/integration/objectstore/test_objectstore_datatype_upload.py index f1059e7a7d6..5a2ef4e6bcb 100644 --- a/test/integration/objectstore/test_objectstore_datatype_upload.py +++ b/test/integration/objectstore/test_objectstore_datatype_upload.py @@ -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" diff --git a/test/integration/objectstore/test_selection.py b/test/integration/objectstore/test_selection.py index 75f9f7c73b5..dd4c0e3dd28 100644 --- a/test/integration/objectstore/test_selection.py +++ b/test/integration/objectstore/test_selection.py @@ -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() diff --git a/test/integration/objectstore/test_swift_objectstore.py b/test/integration/objectstore/test_swift_objectstore.py index c3e90af1506..0ee10a4b462 100644 --- a/test/integration/objectstore/test_swift_objectstore.py +++ b/test/integration/objectstore/test_swift_objectstore.py @@ -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: