From acb504eef936fc1dabaa539b3184bd347d24c1ca Mon Sep 17 00:00:00 2001 From: nhertz <nhertz@nrao.edu> Date: Tue, 20 Oct 2020 09:53:20 -0600 Subject: [PATCH] Added test for creating and submitting workflow requests --- shared/workspaces/test/test_workflow_services.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/shared/workspaces/test/test_workflow_services.py b/shared/workspaces/test/test_workflow_services.py index d3dfcf65a..a76fab423 100644 --- a/shared/workspaces/test/test_workflow_services.py +++ b/shared/workspaces/test/test_workflow_services.py @@ -1,6 +1,8 @@ from typing import Dict, List import json +import requests +from pycapo import CapoConfig from workspaces.schema import ( Workflow, WorkflowTemplate, @@ -82,3 +84,14 @@ def test_workflow_creation(): # execute the null workflow # service.execute(request, []) + + +def test_workflow_request_execution(): + """ + Test whether a null workflow request can properly be executed + """ + settings = CapoConfig().settings("edu.nrao.archive.workspaces.WorkflowSettings") + r1 = requests.post(f"{settings.serviceUrl}/workflows/null/requests/create?args=-g") + print(r1.json()) + r2 = requests.post(f"{settings.serviceUrl}/workflows/requests/{r1.json()['workflow_request_id']}/submit") + print(r2.json()) -- GitLab