storage/kubernetes: fix kubernetes storage conformance test failures

This commit is contained in:
Eric Chiang
2017-02-23 19:20:50 -08:00
parent c76832eaea
commit 4be029c6c1
3 changed files with 10 additions and 2 deletions

View File

@@ -135,6 +135,9 @@ func checkHTTPErr(r *http.Response, validStatusCodes ...int) error {
if r.StatusCode == http.StatusNotFound {
return storage.ErrNotFound
}
if r.Request.Method == "POST" && r.StatusCode == http.StatusConflict {
return storage.ErrAlreadyExists
}
var url, method string
if r.Request != nil {