Skip to content
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