Updating StatusDetails.ID to Name in internal API

This commit is contained in:
nikhiljindal
2015-06-05 06:45:59 -07:00
parent a161edb396
commit 7cc50448e3
10 changed files with 148 additions and 147 deletions

View File

@@ -35,7 +35,7 @@ func TestErrorsToAPIStatus(t *testing.T) {
Message: "foo \"bar\" not found",
Details: &api.StatusDetails{
Kind: "foo",
ID: "bar",
Name: "bar",
},
},
errors.NewAlreadyExists("foo", "bar"): {
@@ -45,7 +45,7 @@ func TestErrorsToAPIStatus(t *testing.T) {
Message: "foo \"bar\" already exists",
Details: &api.StatusDetails{
Kind: "foo",
ID: "bar",
Name: "bar",
},
},
errors.NewConflict("foo", "bar", stderrs.New("failure")): {
@@ -55,7 +55,7 @@ func TestErrorsToAPIStatus(t *testing.T) {
Message: "foo \"bar\" cannot be updated: failure",
Details: &api.StatusDetails{
Kind: "foo",
ID: "bar",
Name: "bar",
},
},
}

View File

@@ -564,7 +564,7 @@ func DeleteResource(r rest.GracefulDeleter, checkBody bool, scope RequestScope,
Status: api.StatusSuccess,
Code: http.StatusOK,
Details: &api.StatusDetails{
ID: name,
Name: name,
Kind: scope.Kind,
},
}