From 0128e05a2389e5df848e596f46c4cbe2c38d1cd0 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Fri, 16 Sep 2022 17:19:49 +0200 Subject: [PATCH] Fix export ro-crate to file source Write to the store the correct archive file --- lib/galaxy/model/store/__init__.py | 4 ++-- test/integration/test_workflow_tasks.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/model/store/__init__.py b/lib/galaxy/model/store/__init__.py index e8b83f0e957..9f08f1947ac 100644 --- a/lib/galaxy/model/store/__init__.py +++ b/lib/galaxy/model/store/__init__.py @@ -2240,8 +2240,8 @@ class ROCrateArchiveModelExportStore(DirectoryModelExportStore, WriteCrates): else: file_source_path = self.file_sources.get_file_source_path(self.file_source_uri) file_source = file_source_path.file_source - assert os.path.exists(self.out_file) - file_source.write_from(file_source_path.path, self.out_file) + assert os.path.exists(rval), rval + file_source.write_from(file_source_path.path, rval) shutil.rmtree(self.temp_output_dir) diff --git a/test/integration/test_workflow_tasks.py b/test/integration/test_workflow_tasks.py index bd76892f136..4f411148c2b 100644 --- a/test/integration/test_workflow_tasks.py +++ b/test/integration/test_workflow_tasks.py @@ -58,6 +58,10 @@ class WorkflowTasksIntegrationTestCase( ro_crate_path = self._export_ro_crate(False) assert CompressedFile(ro_crate_path).file_type == "zip" + def test_export_ro_crate_to_uri(self): + ro_crate_path = self._export_ro_crate(True) + assert CompressedFile(ro_crate_path).file_type == "zip" + def _export_ro_crate(self, to_uri): with self.dataset_populator.test_history() as history_id: summary = self._run_workflow_with_runtime_data_column_parameter(history_id)