Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
haoming29 committed Mar 26, 2024
1 parent 2c7cdb3 commit 1757fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions director/director_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func TestDirectorRegistration(t *testing.T) {

assert.Equal(t, http.StatusForbidden, w.Result().StatusCode, "Expected failing status code of 403")
body, _ := io.ReadAll(w.Result().Body)
assert.Equal(t, `{"error":"Authorization token verification failed"}`, string(body), "Failure wasn't because token verification failed")
assert.Contains(t, string(body), "Authorization token verification failed", "Failure wasn't because token verification failed")

namaspaceADs := listNamespacesFromOrigins()
assert.False(t, NamespaceAdContainsPath(namaspaceADs, "/foo/bar"), "Found namespace in the director cache even if the token validation failed.")
Expand Down Expand Up @@ -424,7 +424,7 @@ func TestDirectorRegistration(t *testing.T) {

assert.Equal(t, http.StatusForbidden, w.Result().StatusCode, "Expected failing status code of 403")
body, _ := io.ReadAll(w.Result().Body)
assert.Equal(t, `{"error":"Authorization token verification failed"}`, string(body), "Failure wasn't because token verification failed")
assert.Contains(t, string(body), "Authorization token verification failed", "Failure wasn't because token verification failed")

namaspaceADs := listNamespacesFromOrigins()
assert.False(t, NamespaceAdContainsPath(namaspaceADs, "/foo/bar"), "Found namespace in the director cache even if the token validation failed.")
Expand Down

0 comments on commit 1757fbd

Please sign in to comment.