Merge pull request #32285 from dmcgowan/revert-fix-for-flaky-misconfigured-token-test
Revert change to TestPushMisconfiguredTokenServiceResponseError
This commit is contained in:
commit
61d3ddfe78
1 changed files with 4 additions and 3 deletions
|
@ -606,15 +606,16 @@ func (s *DockerRegistryAuthTokenSuite) TestPushMisconfiguredTokenServiceResponse
|
|||
}
|
||||
|
||||
func (s *DockerRegistryAuthTokenSuite) TestPushMisconfiguredTokenServiceResponseError(c *check.C) {
|
||||
ts := getTestTokenService(http.StatusTooManyRequests, `{"errors": [{"code":"TOOMANYREQUESTS","message":"out of tokens"}]}`, 10)
|
||||
ts := getTestTokenService(http.StatusTooManyRequests, `{"errors": [{"code":"TOOMANYREQUESTS","message":"out of tokens"}]}`, 3)
|
||||
defer ts.Close()
|
||||
s.setupRegistryWithTokenService(c, ts.URL)
|
||||
repoName := fmt.Sprintf("%s/busybox", privateRegistryURL)
|
||||
dockerCmd(c, "tag", "busybox", repoName)
|
||||
out, _, err := dockerCmdWithError("push", repoName)
|
||||
c.Assert(err, check.NotNil, check.Commentf(out))
|
||||
c.Assert(out, checker.Contains, "Retrying")
|
||||
c.Assert(out, checker.Not(checker.Contains), "Retrying in 15")
|
||||
// TODO: isolate test so that it can be guaranteed that the 503 will trigger xfer retries
|
||||
//c.Assert(out, checker.Contains, "Retrying")
|
||||
//c.Assert(out, checker.Not(checker.Contains), "Retrying in 15")
|
||||
split := strings.Split(out, "\n")
|
||||
c.Assert(split[len(split)-2], check.Equals, "toomanyrequests: out of tokens")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue