KEMBAR78
Release v0.0.14 · robmorgan/infraspec · GitHub
Skip to content

v0.0.14

Latest

Choose a tag to compare

@robmorgan robmorgan released this 27 Jul 02:46
· 93 commits to main since this release
3c9ee73

This releases introduces the new http provider.

🌐 HTTP Provider

Users can now use the http provider to test HTTP endpoints including GET, POST methods, form data and file uploads. For example, the following feature ensures an API is available and returns the correct status code.

Feature: HTTP Requests
  As a DevOps Engineer
  I want to test HTTP endpoints
  So that I can validate API functionality and infrastructure

  Scenario: Test basic GET request
    Given I have a HTTP endpoint at "http://localhost:8000/get"
    When I make a GET request
    Then the HTTP response status should be 200

And this feature tests a file upload:

  Scenario: Test file upload with form data
    Given I have a HTTP endpoint at "http://localhost:8000/post"
    And I have a file "../../examples/http/test-file.txt" as field "file"
    And I set content type to "multipart/form-data"
    And I set the form data to:
      | Name | Value                                |
      | uuid | 191152a9-0bd6-4db0-999d-12787295f1ec |
      | type | document                             |
    When I make a POST request
    Then the HTTP response status should be 200

What's Changed

  • feat: add HTTP request support for API testing by @robmorgan in #49

Full Changelog: v0.0.13...v0.0.14