Skip to content

Commit

Permalink
Fix for get workflow execution input and output (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectormachin authored Sep 7, 2023
1 parent 175fde3 commit 40d2758
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/swoop/api/routers/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ async def get_workflow_execution_result(
"""
Retrieves workflow execution output payload by jobID
"""
results = request.app.state.io.get_object(f"/execution/{jobID}/output.json")
results = request.app.state.io.get_object(f"/executions/{jobID}/output.json")

if not results:
raise HTTPException(
Expand All @@ -309,7 +309,7 @@ async def get_workflow_execution_inputs(request: Request, jobID) -> dict | APIEx
"""
Retrieves workflow execution input payload by jobID
"""
payload = request.app.state.io.get_object(f"/execution/{jobID}/input.json")
payload = request.app.state.io.get_object(f"/executions/{jobID}/input.json")

if not payload:
raise HTTPException(
Expand Down
4 changes: 2 additions & 2 deletions tests/api/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
[
{
"source": "base_01",
"destination": "/execution/0187c88d-a9e0-788c-adcb-c0b951f8be91",
"destination": "/executions/0187c88d-a9e0-788c-adcb-c0b951f8be91",
},
{
"source": "base_02",
"destination": "/execution/0187c88d-a9e0-757e-aa36-2fbb6c834cb5",
"destination": "/executions/0187c88d-a9e0-757e-aa36-2fbb6c834cb5",
},
],
__name__,
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ def inject_io_fixture(io_fixtures, io_postfix=None, scope="module"):
[
{
"source": "base_01",
"destination": "/execution/2595f2da-81a6-423c-84db-935e6791046e",
"destination": "/executions/2595f2da-81a6-423c-84db-935e6791046e",
},
{
"source": "base_02",
"destination": "/execution/81842304-0aa9-4609-89f0-1c86819b0752",
"destination": "/executions/81842304-0aa9-4609-89f0-1c86819b0752",
},
],
__name__,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
[
{
"source": "base_01",
"destination": "/execution/2595f2da-81a6-423c-84db-935e6791046e",
"destination": "/executions/2595f2da-81a6-423c-84db-935e6791046e",
},
{
"source": "base_02",
"destination": "/execution/81842304-0aa9-4609-89f0-1c86819b0752",
"destination": "/executions/81842304-0aa9-4609-89f0-1c86819b0752",
},
],
__name__,
Expand All @@ -30,14 +30,14 @@ def test_hasbucket(test_client, bucket_name):

def test_add_object(test_client, single_object):
test_client.app.state.io.put_object(
"/execution/2595f2da-81a6-423c-84db-935e6791046e/io.json",
"/executions/2595f2da-81a6-423c-84db-935e6791046e/io.json",
json.dumps(single_object),
)
assert True


def test_remove_object(test_client):
test_client.app.state.io.delete_object(
"/execution/2595f2da-81a6-423c-84db-935e6791046e/io.json"
"/executions/2595f2da-81a6-423c-84db-935e6791046e/io.json"
)
assert True

0 comments on commit 40d2758

Please sign in to comment.