Skip to content

TestLoginFailsWithBadCredentials: prepare for Go 1.14 changes#40473

Merged
tiborvass merged 1 commit intomoby:masterfrom
thaJeztah:fix_TestLoginFailsWithBadCredentials
Feb 10, 2020
Merged

TestLoginFailsWithBadCredentials: prepare for Go 1.14 changes#40473
tiborvass merged 1 commit intomoby:masterfrom
thaJeztah:fix_TestLoginFailsWithBadCredentials

Conversation

@thaJeztah
Copy link
Member

relates to #40353

Go 1.14 adds quotes around the url in the error returned:

=== FAIL: arm64.integration.system TestLoginFailsWithBadCredentials (0.27s)
    TestLoginFailsWithBadCredentials: login_test.go:27: assertion failed: expected error "Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password", got "Error response from daemon: Get \"https://registry-1.docker.io/v2/\": unauthorized: incorrect username or password"
        Error response from daemon: Get "https://registry-1.docker.io/v2/": unauthorized: incorrect username or password

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use assert.Check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated; PTAL

Go 1.14 adds quotes around the url in the error returned:

    === FAIL: arm64.integration.system TestLoginFailsWithBadCredentials (0.27s)
        TestLoginFailsWithBadCredentials: login_test.go:27: assertion failed: expected error "Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password", got "Error response from daemon: Get \"https://registry-1.docker.io/v2/\": unauthorized: incorrect username or password"
            Error response from daemon: Get "https://registry-1.docker.io/v2/": unauthorized: incorrect username or password

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the fix_TestLoginFailsWithBadCredentials branch from 88567f0 to e55bff5 Compare February 10, 2020 18:05
Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiborvass tiborvass merged commit c6400be into moby:master Feb 10, 2020
@thaJeztah thaJeztah deleted the fix_TestLoginFailsWithBadCredentials branch February 10, 2020 22:41
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants