emicklei / forest

REST Api Testing package for writing integration tests in Go
MIT License
123 stars 8 forks source link

GET request to a service that requires a certificate. #4

Closed jhollar closed 7 years ago

jhollar commented 7 years ago

need to issue a GET request to a service that requires a certificate. I have the .pem and key files but I'm not sure how to use it within forest. Could you provide an example?

FAIL: TestOrganizationsExists (0.30s) log.go:54: <-- organizations_test.go:48

GET https://[commented out]:8443/testsystem/v1/organizations map[Accept:[application/json]] log.go:54: <-- organizations_test.go:48 CheckError: did not expect to receive err: Get https://[commented out]:8443/testsystem/v1/organizations: x509: cannot validate certificate for ***** because it doesn't contain any IP SANs log.go:54: <-- organizations_test.go:49 ExpectStatus: got status 0 but want 200, GET https://[commented out]:8443/testsystem/v1/organizations FAIL exit status 1

emicklei commented 7 years ago

as discussed on ernestmicklei.com
see https://gist.github.com/michaljemala/d6f4e01c4834bf47a9c4