$ make unit
... ... ..
=== Failed
=== FAIL: openstack/containerinfra/v1/certificates/testing TestCreateCertificates (0.00s)
http_responses.go:93: Request method = POST, expected GET
DONE 1750 tests, 1 failure in 25.061s
exit status 1
make: *** [Makefile:40: unit] Error 1
proposed fix:
diff --git a/openstack/containerinfra/v1/certificates/testing/fixtures_test.go b/openstack/containerinfra/v1/certificates/testing/fixtures_test.go
index 67381f578..562a9f142 100644
--- a/openstack/containerinfra/v1/certificates/testing/fixtures_test.go
+++ b/openstack/containerinfra/v1/certificates/testing/fixtures_test.go
@@ -85,7 +85,7 @@ func HandleGetCertificateSuccessfully(t *testing.T, fakeServer th.FakeServer) {
func HandleCreateCertificateSuccessfully(t *testing.T, fakeServer th.FakeServer) {
fakeServer.Mux.HandleFunc("/v1/certificates/", func(w http.ResponseWriter, r *http.Request) {
- th.TestMethod(t, r, "GET")
+ th.TestMethod(t, r, "POST")
th.TestHeader(t, r, "X-Auth-Token", client.TokenID)
w.Header().Add("Content-Type", "application/json")
The only thing I don't understand is why the CI tests didn't catch this.
$ make unit ... ... .. === Failed === FAIL: openstack/containerinfra/v1/certificates/testing TestCreateCertificates (0.00s) http_responses.go:93: Request method = POST, expected GET DONE 1750 tests, 1 failure in 25.061s exit status 1 make: *** [Makefile:40: unit] Error 1proposed fix:
The only thing I don't understand is why the CI tests didn't catch this.