Add namespace error checking if a resource is not found.
This commit is contained in:
@@ -283,6 +283,8 @@ func TestApplyNonExistObject(t *testing.T) {
|
||||
NegotiatedSerializer: ns,
|
||||
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
|
||||
switch p, m := req.URL.Path, req.Method; {
|
||||
case p == "/api/v1/namespaces/test" && m == "GET":
|
||||
return &http.Response{StatusCode: 404, Header: defaultHeader(), Body: ioutil.NopCloser(bytes.NewReader(nil))}, nil
|
||||
case p == pathNameRC && m == "GET":
|
||||
return &http.Response{StatusCode: 404, Header: defaultHeader(), Body: ioutil.NopCloser(bytes.NewReader(nil))}, nil
|
||||
case p == pathRC && m == "POST":
|
||||
|
Reference in New Issue
Block a user