1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

distribution: errors: do not access the errors slice if it's empty

- cherry-pick from 1.10.3 branch: 0186f4d422
- add token service test suite
- add integration test (missing in 1.10.3 branch)

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca
2016-03-14 21:11:35 +01:00
parent 2b1b235acf
commit 1b5c2e1d72
11 changed files with 130 additions and 28 deletions

View File

@ -255,7 +255,7 @@ func (s *DockerHubPullSuite) TestPullClientDisconnect(c *check.C) {
c.Assert(err, checker.NotNil, check.Commentf("image was pulled after client disconnected"))
}
func (s *DockerRegistryAuthSuite) TestPullNoCredentialsNotFound(c *check.C) {
func (s *DockerRegistryAuthHtpasswdSuite) TestPullNoCredentialsNotFound(c *check.C) {
// we don't care about the actual image, we just want to see image not found
// because that means v2 call returned 401 and we fell back to v1 which usually
// gives a 404 (in this case the test registry doesn't handle v1 at all)