Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added packet assertions to wick test cases #413

Merged
merged 5 commits into from
Aug 25, 2023
Merged

Conversation

jsoverson
Copy link
Contributor

This PR adds the concept of assertions and operators to wick tests to improve the flexibility of test cases.

There are 5 initial operators, LessThan, GreaterThan, Equals, Regex, and Contains with Contains being the only one implemented right now. The former four are self-explanatory. Contains is a loose deep equality.

tests:
  - with:
      url: '{{ctx.env.HTTPBIN}}'
    cases:
      - operation: post
        inputs:
          - name: id
            value: '1'
          - name: name
            value: 'wick'
        outputs:
          - name: body
            assertions:
              - operator: Contains
                value:
                  form:
                    from_root: 'nas.glhf.lan:9888'
                    id: '1'
                    name: 'wick'
          - name: response
            assertions:
              - operator: Contains
                value:
                  status: '200'
              - operator: Contains
                value:
                  version: '1.1'

@jsoverson jsoverson changed the base branch from main to wick-app-invoke August 25, 2023 13:40
@jsoverson jsoverson marked this pull request as ready for review August 25, 2023 13:42
Base automatically changed from wick-app-invoke to main August 25, 2023 14:27
@jsoverson jsoverson force-pushed the packet-assertions branch 2 times, most recently from b492467 to 0f0535f Compare August 25, 2023 16:49
@jsoverson jsoverson merged commit 6974470 into main Aug 25, 2023
@jsoverson jsoverson deleted the packet-assertions branch August 25, 2023 17:44
@jsoverson jsoverson mentioned this pull request Aug 30, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants