CTK data-flow.feature test has a bug?
The test expects the endpoint to be resolved into https://petstore.swagger.io/v2/pet/1
https://github.com/serverlessworkflow/specification/blob/c46f1ccc172dfea27ec5fbfad4ef9e6c9fb8dd27/ctk/features/data-flow.feature#L78
# Tests using non-object output
Scenario: Use Non-object Output
Given a workflow with definition:
"""yaml
document:
dsl: '1.0.0'
namespace: default
name: non-object-output
version: '1.0.0'
do:
- getPetById1:
call: http
with:
method: get
endpoint:
uri: https://petstore.swagger.io/v2/pet/{petId} #simple interpolation, only possible with top level variables
output:
as: .id
- getPetById2:
call: http
with:
method: get
endpoint:
uri: https://petstore.swagger.io/v2/pet/2
output:
as: '{ ids: [ $input, .id ] }'
"""
When the workflow is executed
Then the workflow should complete with output:
"""yaml
ids: [ 1, 2 ]
"""
But there is no input to resolve petId into 1 for the test to succeed?
Is it a bug, or am I missing something?
This happened:
The tests fail since there is no way to resolve https://petstore.swagger.io/v2/pet/{petId} into https://petstore.swagger.io/v2/pet/1
I expected this:
Either the test fails, or the test input needs to be added.
Area(s)
CTK
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
@ksanderer Good catch. It's missing a "Given input" clause, as that's where the petId was expected to be defined when the test was authored.
@ksanderer mind sending a PR to fix it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.