Fix forbidden message format

Before this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".
This commit is contained in:
Cao Shufeng
2017-07-17 14:44:41 +08:00
parent 65da3ce246
commit ab09186737
3 changed files with 16 additions and 6 deletions

View File

@@ -171,7 +171,7 @@ func TestStatus(t *testing.T) {
statusCode: http.StatusForbidden,
reqPath: "/apis",
reason: "Forbidden",
message: ` "" is forbidden: User "" cannot get path "/apis".: "Everything is forbidden."`,
message: `forbidden: User "" cannot get path "/apis".: "Everything is forbidden."`,
},
{
name: "401",