Unverified Commit 2d63389e authored by mvdbeek's avatar mvdbeek
Browse files

Add test that verifies visible doesn't revert on job finish

It isn't exactly a regression test, for that you'd have to time the test
so that we change the visible attribute while the job is finishing.  I
think this test here is worth running independently, and I don't think
we have an explicit test like that.
parent fc1fc4bb
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -810,6 +810,23 @@ class ToolsTestCase(ApiTestCase, TestsTools):
    def test_apply_rules_6(self):
        self._apply_rules_and_check(rules_test_data.EXAMPLE_6)

    @skip_without_tool("galaxy_json_sleep")
    def test_dataset_hidden_after_job_finish(self):
        with self.dataset_populator.test_history() as history_id:
            inputs = {
                "sleep_time": 5,
            }
            response = self._run("galaxy_json_sleep", history_id, inputs, assert_ok=True)
            output = response["outputs"][0]
            response = self._put(
                f"histories/{history_id}/contents/datasets/{output['id']}", data={"visible": False}, json=True
            )
            response.raise_for_status()
            output_details = self.dataset_populator.get_history_dataset_details(history_id, dataset=output, wait=False)
            assert not output_details["visible"]
            output_details = self.dataset_populator.get_history_dataset_details(history_id, dataset=output, wait=True)
            assert not output_details["visible"]

    @skip_without_tool("multi_select")
    def test_multi_select_as_list(self):
        with self.dataset_populator.test_history() as history_id:
+28 −0
Original line number Diff line number Diff line
<tool id="galaxy_json_sleep" name="galaxy_json_sleep" version="1.0.0" profile="22.05">
    <command><![CDATA[ 
        touch out &&
        sleep $sleep_time &&
        cp '$c1' galaxy.json
    ]]></command>
    <configfiles>
        <configfile name="c1">{"output_tool_supplied_metadata": {
            "name": "my dynamic name",
            "ext": "txt",
            "info": "my dynamic info"
            }}
</configfile>
    </configfiles>
    <inputs>
        <param name="sleep_time" type="integer" value="0" />
    </inputs>
    <outputs>
        <data name="output" format="txt" from_work_dir="out" />
    </outputs>
    <tests>
        <test>
            <param name="input" value="7" />
            <output name="output" md5="d41d8cd98f00b204e9800998ecf8427e">
            </output>
        </test>
    </tests>
</tool>
 No newline at end of file
+10 −9
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
  <tool file="multi_output_assign_primary_ext_dbkey.xml" />
  <tool file="multi_output_recurse.xml" />
  <tool file="multi_output_recurse_collection.xml" />
  <tool file="galaxy_json_discover_and_sleep.xml" />
  <tool file="tool_provided_metadata_1.xml" />
  <tool file="tool_provided_metadata_2.xml" />
  <tool file="tool_provided_metadata_3.xml" />