From 8a862fc431c1a7eed68a3581677d5312273bbaa7 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Sat, 7 Dec 2024 12:12:55 -0500 Subject: [PATCH] Fix: registry login test failing on OSX. --- CONTRIBUTING.md | 6 ++++++ integration/registry_login_test.go | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c9563063..901b32c99 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -178,6 +178,12 @@ Writing an integration test typically looks like this, Rather than providing an example here, please have a look at the [`integration/account_test.go`](/integration/account_test.go) file to see what an integration test typically looks like. +Use `make test_integration` to run all integration tests, or run a single integration test as follows. + +``` +go test -v -mod=vendor ./integration -run TestRun/doctl/registry/login/all_required_flags_are_passed/writes_a_docker_config.json_file +``` + #### `godo` mocks To upgrade `godo`, run `make upgrade_godo`. This will: diff --git a/integration/registry_login_test.go b/integration/registry_login_test.go index ddcd083d6..bc2a5e38a 100644 --- a/integration/registry_login_test.go +++ b/integration/registry_login_test.go @@ -86,7 +86,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) { cmd.Env = append(cmd.Env, fmt.Sprintf("DOCKER_CONFIG=%s", tmpDir)) output, err := cmd.CombinedOutput() - expect.NoError(err) + expect.NoError(err, string(output)) fileBytes, err := os.ReadFile(config) expect.NoError(err) @@ -120,7 +120,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) { cmd.Env = append(cmd.Env, fmt.Sprintf("DOCKER_CONFIG=%s", tmpDir)) output, err := cmd.CombinedOutput() - expect.NoError(err) + expect.NoError(err, string(output)) fileBytes, err := os.ReadFile(config) expect.NoError(err) @@ -156,7 +156,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) { cmd.Env = append(cmd.Env, fmt.Sprintf("DOCKER_CONFIG=%s", tmpDir)) output, err := cmd.CombinedOutput() - expect.NoError(err) + expect.NoError(err, string(output)) fileBytes, err := os.ReadFile(config) expect.NoError(err)