Skip to content

Commit 40d2758

Browse files
authored
Fix for get workflow execution input and output (#38)
1 parent 175fde3 commit 40d2758

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/swoop/api/routers/jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ async def get_workflow_execution_result(
287287
"""
288288
Retrieves workflow execution output payload by jobID
289289
"""
290-
results = request.app.state.io.get_object(f"/execution/{jobID}/output.json")
290+
results = request.app.state.io.get_object(f"/executions/{jobID}/output.json")
291291

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

314314
if not payload:
315315
raise HTTPException(

tests/api/test_jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
[
99
{
1010
"source": "base_01",
11-
"destination": "/execution/0187c88d-a9e0-788c-adcb-c0b951f8be91",
11+
"destination": "/executions/0187c88d-a9e0-788c-adcb-c0b951f8be91",
1212
},
1313
{
1414
"source": "base_02",
15-
"destination": "/execution/0187c88d-a9e0-757e-aa36-2fbb6c834cb5",
15+
"destination": "/executions/0187c88d-a9e0-757e-aa36-2fbb6c834cb5",
1616
},
1717
],
1818
__name__,

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ def inject_io_fixture(io_fixtures, io_postfix=None, scope="module"):
136136
[
137137
{
138138
"source": "base_01",
139-
"destination": "/execution/2595f2da-81a6-423c-84db-935e6791046e",
139+
"destination": "/executions/2595f2da-81a6-423c-84db-935e6791046e",
140140
},
141141
{
142142
"source": "base_02",
143-
"destination": "/execution/81842304-0aa9-4609-89f0-1c86819b0752",
143+
"destination": "/executions/81842304-0aa9-4609-89f0-1c86819b0752",
144144
},
145145
],
146146
__name__,

tests/test_io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
[
99
{
1010
"source": "base_01",
11-
"destination": "/execution/2595f2da-81a6-423c-84db-935e6791046e",
11+
"destination": "/executions/2595f2da-81a6-423c-84db-935e6791046e",
1212
},
1313
{
1414
"source": "base_02",
15-
"destination": "/execution/81842304-0aa9-4609-89f0-1c86819b0752",
15+
"destination": "/executions/81842304-0aa9-4609-89f0-1c86819b0752",
1616
},
1717
],
1818
__name__,
@@ -30,14 +30,14 @@ def test_hasbucket(test_client, bucket_name):
3030

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

3838

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

0 commit comments

Comments
 (0)