Skip to content

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented May 11, 2019

This reverts commit 1c0fb51 (#593 ).

That commit introduces a flake (depending on in which order normalizedAuths are processed):

--- FAIL: TestGetAuth (0.01s)
    config_test.go:71: using temporary XDG_RUNTIME_DIR directory: "/var/folders/14/d3kqjd4d57q1bff3sph57ks80000gn/T/test_docker_client_get_auth799396144"
    config_test.go:87: using temporary home directory: "/var/folders/14/d3kqjd4d57q1bff3sph57ks80000gn/T/test_docker_client_get_auth026490575"
    --- FAIL: TestGetAuth/normalize_registry#01 (0.00s)
        Error Trace:    config_test.go:218
        Error:      	Not equal:
                    	expected: "docker"
                    	received: "index"
        Error Trace:    config_test.go:219
        Error:      	Not equal:
                    	expected: "io"
                    	received: "docker.io"
FAIL
FAIL	github.com/containers/image/pkg/docker/config	0.121s

While the commit says “add fixtures”, it seems that not a single affected test case has actually been just ported without modification, and there’s no rationale for those modifications. So, while moving to fixtures instead of autogenerating data, and the use of t.Run and assert.Equal, are, as such, certainly valuable, this is all, along with the test suite changes, conflated in a single commit, so it’s not trivially easy to preserve the useful parts without the parts that may need more discussion; I’m afraid I’m going to revert all of this for now.

@mtrmac mtrmac force-pushed the revert-auth-tests branch from 25374d2 to 8b4b75e Compare May 11, 2019 17:51
@wking
Copy link
Contributor

wking commented May 11, 2019

Fix for the flake in #626, as an alternative to the revert here.

This reverts commit 1c0fb51.

That commit introduces a flake (depending on in which order normalizedAuths
are processed):

--- FAIL: TestGetAuth (0.01s)
    config_test.go:71: using temporary XDG_RUNTIME_DIR directory: "/var/folders/14/d3kqjd4d57q1bff3sph57ks80000gn/T/test_docker_client_get_auth799396144"
    config_test.go:87: using temporary home directory: "/var/folders/14/d3kqjd4d57q1bff3sph57ks80000gn/T/test_docker_client_get_auth026490575"
    --- FAIL: TestGetAuth/normalize_registry#01 (0.00s)
        Error Trace:    config_test.go:218
        Error:      	Not equal:
                    	expected: "docker"
                    	received: "index"
        Error Trace:    config_test.go:219
        Error:      	Not equal:
                    	expected: "io"
                    	received: "docker.io"
FAIL
FAIL	github.com/containers/image/pkg/docker/config	0.121s

While the commit says “add fixtures”, it seems that not a single affected test
case has actually been just ported without modification, and there’s no
rationale for those modifications. So, while moving to fixtures instead of
autogenerating data, and the use of t.Run and assert.Equal, are, as such,
certainly valuable, this is all, along with the test suite changes, conflated
in a single commit, so it’s not trivially easy to preserve the useful parts
without the parts that may need more discussion; I’m afraid I'm going to
revert all of this for now.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Collaborator Author

mtrmac commented May 13, 2019

@vrothberg PTAL; consider also #626.

@mtrmac mtrmac closed this May 14, 2019
@mtrmac mtrmac deleted the revert-auth-tests branch May 14, 2019 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants