Update API codes (#336)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-09-08 23:57:26 -04:00
1 parent 99d5456d7a
commit f94f21fd97
74 files changed
+1557 -1802

No files matched your search

+3 -3
View File
@@ -175,8 +175,8 @@ func TestCrud(t *testing.T) {
assert.True(existed, "Expected existing catalog when deleted, but it wasn't.")
existed, apiErr, err = hClient.Delete(tc.Context(), h.Id)
require.NoError(err)
assert.NotNil(apiErr)
assert.EqualValues(http.StatusForbidden, apiErr.Status)
assert.Nil(apiErr)
assert.False(existed)
}
// TODO: Get better coverage for expected errors and error formats.
@@ -211,7 +211,7 @@ func TestErrors(t *testing.T) {
_, apiErr, err = hClient.Read(tc.Context(), static.HostSetPrefix+"_doesntexis")
require.NoError(err)
assert.NotNil(apiErr)
assert.EqualValues(http.StatusForbidden, apiErr.Status)
assert.EqualValues(http.StatusNotFound, apiErr.Status)
_, apiErr, err = hClient.Read(tc.Context(), "invalid id")
require.NoError(err)