Skip to content

CTK data-flow.feature test has a bug? #1108

Open
@ksanderer

Description

@ksanderer

The test expects the endpoint to be resolved into https://petstore.swagger.io/v2/pet/1

uri: https://petstore.swagger.io/v2/pet/{petId} #simple interpolation, only possible with top level variables

  # 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 🐞

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ctkChanges in the CTK (Compliance Test Kit)type: bug

    Type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions