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

Updated docs on running single tests #12801

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions docs/content/code-review/create-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ VCR test failures that do not immediately seem related to your PR are most likel
git checkout modular-magician/auto-pr-PR_NUMBER
make test
make lint
make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool'
make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool_basic$$'
```
Replace PR_NUMBER with your PR's ID.
{{< /tab >}}
Expand All @@ -65,7 +65,7 @@ VCR test failures that do not immediately seem related to your PR are most likel
git checkout modular-magician/auto-pr-PR_NUMBER
make test
make lint
make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool'
make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool_basic$$'
```
Replace PR_NUMBER with your PR's ID.
{{< /tab >}}
Expand Down
6 changes: 3 additions & 3 deletions docs/content/test/run-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ aliases:
1. Run acceptance tests for only modified resources. (Full test runs can take over 9 hours.) See [Go's documentation](https://pkg.go.dev/cmd/go#hdr-Testing_flags) for more information about `-run` and other flags.

```bash
make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool'
make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool_basic$$'
```

> **Note:** Acceptance tests create actual infrastructure which can incur costs. Acceptance tests may not clean up after themselves if interrupted, so you may want to check for stray resources and / or billing charges.

1. Optional: Save verbose test output (including API requests and responses) to a file for analysis.

```bash
TF_LOG=DEBUG make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool_basic' > output.log
TF_LOG=DEBUG make testacc TEST=./google/services/container TESTARGS='-run=TestAccContainerNodePool_basic$$' > output.log
```

1. Optional: Debug tests with [Delve](https://github.com/go-delve/delve). See [`dlv test` documentation](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_test.md) for information about available flags.
Expand Down Expand Up @@ -100,7 +100,7 @@ aliases:
1. Optional: Save verbose test output to a file for analysis.

```bash
TF_LOG=DEBUG make testacc TEST=./google-beta/services/container TESTARGS='-run=TestAccContainerNodePool_basic' > output.log
TF_LOG=DEBUG make testacc TEST=./google-beta/services/container TESTARGS='-run=TestAccContainerNodePool_basic$$' > output.log
```

1. Optional: Debug tests with [Delve](https://github.com/go-delve/delve). See [`dlv test` documentation](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_test.md) for information about available flags.
Expand Down
Loading