Skip to content

Commit

Permalink
Merge pull request #19454 from mvdbeek/fix_source_metadata_trs_import
Browse files Browse the repository at this point in the history
Add test that verifies workflow source_metadata is preserved on landing claim
jmchilton authored Jan 28, 2025
2 parents a8b1646 + d76f639 commit 9bdeea0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/galaxy_test/api/test_landing.py
Original file line number Diff line number Diff line change
@@ -106,6 +106,20 @@ def test_create_private_workflow_landing_anonymous_user(self):
_cannot_claim_request(self.dataset_populator, response)
_cannot_use_request(self.dataset_populator, response)

def test_landing_claim_preserves_source_metadata(self):
request = CreateWorkflowLandingRequestPayload(
workflow_id="https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12",
workflow_target_type="trs_url",
request_state={},
public=True,
)
response = self.dataset_populator.create_workflow_landing(request)
landing_request = self.dataset_populator.use_workflow_landing(response.uuid)
workflow_id = landing_request.workflow_id
workflow = self.workflow_populator._get(f"/api/workflows/{workflow_id}?instance=true").json()
assert workflow["source_metadata"]["trs_tool_id"] == "#workflow/github.com/iwc-workflows/chipseq-pe/main"
assert workflow["source_metadata"]["trs_version_id"] == "v0.12"


def _workflow_request_state() -> Dict[str, Any]:
deferred = False

0 comments on commit 9bdeea0

Please sign in to comment.