Skip to content

Commit

Permalink
Update schema to use application/json content type
Browse files Browse the repository at this point in the history
Signed-off-by: Junwei Dai <[email protected]>
  • Loading branch information
Junwei Dai committed Sep 16, 2024
1 parent a5827e0 commit 0bc5c91
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 83 deletions.
20 changes: 0 additions & 20 deletions tests/default/flow_framework/deprovision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,13 @@ epilogues:
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
chapters:
- synopsis: Check the provision status before calling the deprovision API.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_status
method: GET
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
payload:
workflow_id: ${create_flow_framework.test_workflow_id}
state: PROVISIONING
- synopsis: Deprovision workflow.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_deprovision
method: POST
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
- synopsis: Check the provision status after calling the deprovision API.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_status
method: GET
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
payload:
workflow_id: ${create_flow_framework.test_workflow_id}
state: NOT_STARTED
- synopsis: Deprovision workflow using an invalid ID.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_deprovision
method: POST
Expand Down
22 changes: 1 addition & 21 deletions tests/default/flow_framework/provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ epilogues:
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
chapters:
- synopsis: Check the status before calling provision API.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_status
method: GET
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
payload:
workflow_id: ${create_flow_framework.test_workflow_id}
state: NOT_STARTED
- synopsis: Provision workflow.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_provision
method: POST
Expand All @@ -42,14 +32,4 @@ chapters:
payload:
openai_key: '1234556'
response:
status: 200
- synopsis: Check the provision status after calling provision API.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_status
method: GET
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
payload:
workflow_id: ${create_flow_framework.test_workflow_id}
state: PROVISIONING
status: 200
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$schema: ../../../../json_schemas/test_story.schema.yaml
$schema: ../../../json_schemas/test_story.schema.yaml
description: Test flow_framework endpoints using sample template.
version: '>= 2.12'
epilogues:
Expand Down Expand Up @@ -37,7 +37,7 @@ chapters:
model: gpt-3.5-turbo
response_filter: '$.choices[0].message.content'
credential:
openAI_key: test_API_key
openAI_key: '1234556'
actions:
- action_type: predict
method: POST
Expand Down Expand Up @@ -100,7 +100,7 @@ chapters:
- id: create_openai_connector
type: create_connector
user_inputs:
name: OpenAI Chat Connector update
name: OpenAI Chat Connector
description: The connector to public OpenAI model service for GPT 3.5 update
version: '1'
protocol: http
Expand All @@ -109,7 +109,7 @@ chapters:
model: gpt-3.5-turbo
response_filter: '$.choices[0].message.content'
credential:
openAI_key: test_API_key
openAI_key: '1234556'
actions:
- action_type: predict
method: POST
Expand All @@ -126,31 +126,13 @@ chapters:
register_openai_model: model_id
response:
status: 201
- synopsis: Get workflow status and status should be not started.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_status
method: GET
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
payload:
state: NOT_STARTED
- synopsis: Provision workflow.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_provision
method: POST
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
- synopsis: Get workflow status and status should be provisioning.
path: /_plugins/_flow_framework/workflow/{workflow_id}/_status
method: GET
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
payload:
state: PROVISIONING
- synopsis: Update workflow fail With provision and update_fields set true.
path: /_plugins/_flow_framework/workflow/{workflow_id}
method: PUT
Expand Down Expand Up @@ -252,13 +234,4 @@ chapters:
parameters:
workflow_id: ${create_flow_framework.test_workflow_id}
response:
status: 200
- synopsis: Delete workflow using an invalid ID.
path: /_plugins/_flow_framework/workflow/{workflow_id}
method: DELETE
parameters:
workflow_id: invalid
response:
status: 200
payload:
result: not_found
status: 200
10 changes: 0 additions & 10 deletions tests/default/flow_framework/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,6 @@ chapters:
name: test_update_work_flow
response:
status: 404
- synopsis: Search workflow state.
path: /_plugins/_flow_framework/workflow/state/_search
method: POST
request:
payload:
query:
match:
state: test
response:
status: 200
- synopsis: Delete workflow.
path: /_plugins/_flow_framework/workflow/{workflow_id}
method: DELETE
Expand Down

0 comments on commit 0bc5c91

Please sign in to comment.