curl/

directory
v1.11.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: MIT, MIT

README

Testkube Logo

Welcome to testkube Executor Curl

testkube Executor Curl is the test executor for testkube that is using Curl.

Issues and enchancements

Please follow to main testkube repository for reporting any issues or discussions

Details

Curl executor is a very simple one, it runs a curl command given as the input and check the response for expected status and body, the input is of form

{
  "command": [
    "curl",
    "https://reqbin.com/echo/get/json",
    "-H",
    "'Accept: application/json'"
  ],
  "expected_status": "200",
  "expected_body": "{\"success\":\"true\"}"
}

Templates can be used to parametrize input

{
  "command": [
    "curl",
    "{{.url}}",
    "-H",
    "'{{.header}}'"
  ],
  "expected_status": "{{.status}}",
  "expected_body": "{{.body}}"
}

and the parameters will be passed by testkube using param flag --param key=value

the executor will check if the response has expected_status and if body of the response contains the expected_body.

The type of the test CRD should be curl/test.

API

testkube Executor Curl implements testkube OpenAPI for executors (look at executor tag)

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL