Skip to content

Instantly share code, notes, and snippets.

@askainet
Created October 6, 2020 15:42
Show Gist options
  • Save askainet/a41ec027e3ec14b8ad54ad4447be6af0 to your computer and use it in GitHub Desktop.
Save askainet/a41ec027e3ec14b8ad54ad4447be6af0 to your computer and use it in GitHub Desktop.
terratest http-helper tests results
$ go test -v -count=1 .
=== RUN TestRunDummyServer
=== PAUSE TestRunDummyServer
=== RUN TestContinuouslyCheck
=== PAUSE TestContinuouslyCheck
=== RUN TestOkBody
=== PAUSE TestOkBody
=== RUN TestHTTPDoWithValidation
=== PAUSE TestHTTPDoWithValidation
=== RUN TestHTTPDoWithCustomValidation
=== PAUSE TestHTTPDoWithCustomValidation
=== RUN TestOkHeaders
=== PAUSE TestOkHeaders
=== RUN TestWrongStatus
=== PAUSE TestWrongStatus
=== RUN TestRequestTimeout
=== PAUSE TestRequestTimeout
=== RUN TestOkWithRetry
=== PAUSE TestOkWithRetry
=== RUN TestErrorWithRetry
=== PAUSE TestErrorWithRetry
=== CONT TestRunDummyServer
=== CONT TestWrongStatus
=== CONT TestErrorWithRetry
=== CONT TestHTTPDoWithValidation
=== CONT TestOkWithRetry
=== CONT TestHTTPDoWithCustomValidation
=== CONT TestRequestTimeout
TestRunDummyServer 2020-10-06T17:41:18+02:00 dummy_server.go:37: Starting dummy HTTP server in port 8081 that will return the text 'dummy-server-QxJeKA'
=== CONT TestOkHeaders
=== CONT TestContinuouslyCheck
TestContinuouslyCheck 2020-10-06T17:41:18+02:00 dummy_server.go:37: Starting dummy HTTP server in port 8082 that will return the text 'dummy-server-W47yCw'
=== CONT TestOkBody
TestOkWithRetry 2020-10-06T17:41:18+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59219
TestErrorWithRetry 2020-10-06T17:41:18+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59215
TestOkWithRetry 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59219
TestWrongStatus 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59218
TestHTTPDoWithValidation 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59216
TestOkBody 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59217
TestHTTPDoWithCustomValidation 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59220
TestRunDummyServer 2020-10-06T17:41:18+02:00 http_helper.go:32: Making an HTTP GET call to URL http://localhost:8081
TestErrorWithRetry 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59215
TestRequestTimeout 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP DELETE call to URL http://127.0.0.1:59222
TestOkHeaders 2020-10-06T17:41:18+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59226
TestOkWithRetry 2020-10-06T17:41:18+02:00 http_helper.go:216: output:
TestOkWithRetry 2020-10-06T17:41:18+02:00 retry.go:103: HTTP POST to URL http://127.0.0.1:59219 returned an error: Validation failed for URL http://127.0.0.1:59219. Response status: 503. Response body:
. Sleeping for 1s and will try again.
--- PASS: TestOkHeaders (0.00s)
--- PASS: TestOkBody (0.00s)
--- PASS: TestHTTPDoWithCustomValidation (0.00s)
TestErrorWithRetry 2020-10-06T17:41:18+02:00 http_helper.go:216: output:
--- PASS: TestHTTPDoWithValidation (0.00s)
--- PASS: TestWrongStatus (0.00s)
TestErrorWithRetry 2020-10-06T17:41:18+02:00 retry.go:103: HTTP POST to URL http://127.0.0.1:59215 returned an error: Validation failed for URL http://127.0.0.1:59215. Response status: 503. Response body:
. Sleeping for 1s and will try again.
--- PASS: TestRunDummyServer (0.01s)
TestOkWithRetry 2020-10-06T17:41:19+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59219
TestOkWithRetry 2020-10-06T17:41:19+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59219
TestErrorWithRetry 2020-10-06T17:41:19+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59215
TestContinuouslyCheck 2020-10-06T17:41:19+02:00 http_helper.go:32: Making an HTTP GET call to URL http://localhost:8082
TestErrorWithRetry 2020-10-06T17:41:19+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59215
TestErrorWithRetry 2020-10-06T17:41:19+02:00 http_helper.go:216: output:
TestErrorWithRetry 2020-10-06T17:41:19+02:00 retry.go:103: HTTP POST to URL http://127.0.0.1:59215 returned an error: Validation failed for URL http://127.0.0.1:59215. Response status: 503. Response body:
. Sleeping for 1s and will try again.
TestOkWithRetry 2020-10-06T17:41:19+02:00 http_helper.go:216: output:
TestOkWithRetry 2020-10-06T17:41:19+02:00 retry.go:103: HTTP POST to URL http://127.0.0.1:59219 returned an error: Validation failed for URL http://127.0.0.1:59219. Response status: 503. Response body:
. Sleeping for 1s and will try again.
TestContinuouslyCheck 2020-10-06T17:41:19+02:00 continuous.go:47: Got response 200 and err <nil> from URL at http://localhost:8082
TestErrorWithRetry 2020-10-06T17:41:20+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59215
TestContinuouslyCheck 2020-10-06T17:41:20+02:00 http_helper.go:32: Making an HTTP GET call to URL http://localhost:8082
TestErrorWithRetry 2020-10-06T17:41:20+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59215
TestOkWithRetry 2020-10-06T17:41:20+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59219
TestOkWithRetry 2020-10-06T17:41:20+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59219
TestOkWithRetry 2020-10-06T17:41:20+02:00 http_helper.go:216: output:
TestErrorWithRetry 2020-10-06T17:41:20+02:00 http_helper.go:216: output:
TestOkWithRetry 2020-10-06T17:41:20+02:00 retry.go:103: HTTP POST to URL http://127.0.0.1:59219 returned an error: Validation failed for URL http://127.0.0.1:59219. Response status: 503. Response body:
. Sleeping for 1s and will try again.
TestErrorWithRetry 2020-10-06T17:41:20+02:00 retry.go:103: HTTP POST to URL http://127.0.0.1:59215 returned an error: Validation failed for URL http://127.0.0.1:59215. Response status: 503. Response body:
. Sleeping for 1s and will try again.
TestContinuouslyCheck 2020-10-06T17:41:20+02:00 continuous.go:47: Got response 200 and err <nil> from URL at http://localhost:8082
TestContinuouslyCheck 2020-10-06T17:41:21+02:00 http_helper.go:32: Making an HTTP GET call to URL http://localhost:8082
TestOkWithRetry 2020-10-06T17:41:21+02:00 retry.go:91: HTTP POST to URL http://127.0.0.1:59219
TestOkWithRetry 2020-10-06T17:41:21+02:00 http_helper.go:156: Making an HTTP POST call to URL http://127.0.0.1:59219
--- PASS: TestErrorWithRetry (3.01s)
TestOkWithRetry 2020-10-06T17:41:21+02:00 http_helper.go:216: output: TEST_CONTENT
--- PASS: TestOkWithRetry (3.01s)
TestContinuouslyCheck 2020-10-06T17:41:21+02:00 continuous.go:47: Got response 200 and err <nil> from URL at http://localhost:8082
TestContinuouslyCheck 2020-10-06T17:41:22+02:00 http_helper.go:32: Making an HTTP GET call to URL http://localhost:8082
TestContinuouslyCheck 2020-10-06T17:41:22+02:00 continuous.go:47: Got response 200 and err <nil> from URL at http://localhost:8082
TestContinuouslyCheck 2020-10-06T17:41:23+02:00 continuous.go:36: Got signal to stop downtime checks for URL http://localhost:8082.
--- PASS: TestContinuouslyCheck (5.00s)
2020/10/06 17:41:33 httptest.Server blocked in Close after 5 seconds, waiting for connections:
*net.TCPConn 0xc00032a028 127.0.0.1:59229 in state active
--- PASS: TestRequestTimeout (15.00s)
PASS
ok github.com/gruntwork-io/terratest/modules/http-helper 15.486s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment