Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix: registry login test failing on OSX. #1628

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dblock
Copy link
Contributor

@dblock dblock commented Dec 7, 2024

(Go noob here, sorry)

I am seeing this failure locally on OSX in integration tests.

$ go test -v -mod=vendor ./integration -run TestRun/doctl/registry/login
=== RUN   TestRun
Suite: doctl
Total: 385 | Focused: 0 | Pending: 0
=== RUN   TestRun/doctl
=== RUN   TestRun/doctl/registry/login/all_required_flags_are_passed/writes_a_docker_config.json_file
=== PAUSE TestRun/doctl/registry/login/all_required_flags_are_passed/writes_a_docker_config.json_file
=== RUN   TestRun/doctl/registry/login/expiry-seconds_flag_is_passed/add_the_correct_query_parameter
=== PAUSE TestRun/doctl/registry/login/expiry-seconds_flag_is_passed/add_the_correct_query_parameter
=== RUN   TestRun/doctl/registry/login/read-only_flag_is_passed_and_the_token_doesn't_expire/add_the_correct_query_parameter
=== PAUSE TestRun/doctl/registry/login/read-only_flag_is_passed_and_the_token_doesn't_expire/add_the_correct_query_parameter
=== CONT  TestRun/doctl/registry/login/all_required_flags_are_passed/writes_a_docker_config.json_file
=== CONT  TestRun/doctl/registry/login/read-only_flag_is_passed_and_the_token_doesn't_expire/add_the_correct_query_parameter
=== CONT  TestRun/doctl/registry/login/expiry-seconds_flag_is_passed/add_the_correct_query_parameter
    registry_login_test.go:123: 
        	Error Trace:	/Users/dblock/source/doctl/dblock-doctl/integration/registry_login_test.go:123
        	            				/Users/dblock/source/doctl/dblock-doctl/vendor/github.com/sclevine/spec/spec.go:269
        	            				/Users/dblock/source/doctl/dblock-doctl/vendor/github.com/sclevine/spec/spec.go:262
        	            				/Users/dblock/source/doctl/dblock-doctl/vendor/github.com/sclevine/spec/parser.go:133
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	TestRun/doctl/registry/login/expiry-seconds_flag_is_passed/add_the_correct_query_parameter
        	Messages:   	Logging Docker in to registry.digitalocean.com
        	            	Error: error storing credentials - err: exit status 1, out: `The specified item already exists in the keychain.`


Passed: 2 | Failed: 1 | Skipped: 0

--- FAIL: TestRun (0.46s)
    --- FAIL: TestRun/doctl (0.00s)
        --- FAIL: TestRun/doctl/registry/login/expiry-seconds_flag_is_passed/add_the_correct_query_parameter (0.45s)
        --- PASS: TestRun/doctl/registry/login/all_required_flags_are_passed/writes_a_docker_config.json_file (0.46s)
        --- PASS: TestRun/doctl/registry/login/read-only_flag_is_passed_and_the_token_doesn't_expire/add_the_correct_query_parameter (0.46s)
FAIL
FAIL	github.com/digitalocean/doctl/integration	1.630s
FAIL

This looks like a side-effect of a prior test that successfully stores credentials and doesn't clean up.

Screenshot 2024-12-08 at 2 02 39 PM

I tried to do a registry logout in the test but haven't succeeded in making it work. If someone can help me write that I can finish this PR.

@dblock dblock changed the title Fix: registry login test failing on OSX. [WIP] Fix: registry login test failing on OSX. Dec 7, 2024
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