Distinguish image registry unavailable and pull failure

This commit is contained in:
jiangyaoguo
2015-09-19 00:09:16 +08:00
parent 036fe16849
commit af46c69553
4 changed files with 11 additions and 3 deletions

View File

@@ -257,7 +257,7 @@ func TestPullWithJSONError(t *testing.T) {
"Bad gateway": {
"ubuntu",
&jsonmessage.JSONError{Code: 502, Message: "<!doctype html>\n<html class=\"no-js\" lang=\"\">\n <head>\n </head>\n <body>\n <h1>Oops, there was an error!</h1>\n <p>We have been contacted of this error, feel free to check out <a href=\"http://status.docker.com/\">status.docker.com</a>\n to see if there is a bigger issue.</p>\n\n </body>\n</html>"},
"because the registry is temporarily unavailable",
kubecontainer.RegistryUnavailable.Error(),
},
}
for i, test := range tests {