Modify the status code number to HTTP status semantics

Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
This commit is contained in:
clarklee92
2019-11-06 00:45:35 +08:00
committed by Kubernetes Publisher
parent d7ea50d263
commit d3a5e5f798
3 changed files with 27 additions and 27 deletions

View File

@@ -476,25 +476,25 @@ func Test_cmdTokenSource_roundTrip(t *testing.T) {
}{
{
"Unauthorized",
http.Response{StatusCode: 401},
http.Response{StatusCode: http.StatusUnauthorized},
make(map[string]string),
make(map[string]string),
},
{
"Unauthorized, nonempty defaultCache",
http.Response{StatusCode: 401},
http.Response{StatusCode: http.StatusUnauthorized},
cmdCache,
cmdCache,
},
{
"Authorized",
http.Response{StatusCode: 200},
http.Response{StatusCode: http.StatusOK},
make(map[string]string),
simpleCacheUpdated,
},
{
"Authorized, nonempty defaultCache",
http.Response{StatusCode: 200},
http.Response{StatusCode: http.StatusOK},
cmdCache,
cmdCacheUpdated,
},