curl -Ls https://github.com/reaandrew/schmokin/releases/latest/download/schmokin_install | bash
schmokin <url> [schmokin-args] -- [curl-args]
flag | description |
---|---|
--eq | equals |
--gt | greater than |
--ge | greater than or equals |
--lt | less than |
--le | less than or equals |
--co | contains |
flag | description |
---|---|
--jq | JQ expression |
--req-header | HTTP Request Header |
--res-header | HTTP Response Header |
--res-body | HTTP Response Body |
--status | HTTP Status |
flag | description |
---|---|
--export | Export extracted variable |
--debug | Show verbose curl output |
All the metrics which curl offers with the -w
argument are available
./schmokin $URL --jq '.status' --eq "UP"
Any extra curl arguments can be placed after the --
separator.
./schmokin $URL --req-header "X-FU" --eq 'BAR' -- -H "X-FU: BAR"
schmokin $URL --status -eq 200
schmokin $URL --jq '.status' --eq "UP"
schmokin $URL --jq '. | length' --gt 4
schmokin $URL --jq '. | length' --ge 6
schmokin $URL --jq '. | length' --lt 4
schmokin $URL --jq '. | length' --le 6
schmokin $ENDPOINT/created --status --gt 200 --lt 202
schmokin $URL --req-header "X-FU" --eq 'BAR' -- -H "X-FU: BAR"
schmokin $URL --res-header "Content-Type" --eq 'application/json'
schmokin $URL --res-body --eq 'UP' -- -X POST -d 'UP'
schmokin $URL --jq '.status' --eq "UP"
# Store the status message of the application in a variable named appStatus
schmokin $ENDPOINT/simple --jq '.status' --export appStatus
# Post the appStatus value and assert on the value
schmokin $ENDPOINT/echo --jq '.message' --eq 'UP' -- -X POST -d '{\"message\":\"$appStatus\"}'