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
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions integration/registry_login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down