Skip to content

Commit

Permalink
Add note to testing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Didainius committed Aug 22, 2019
1 parent cdb7101 commit 255479b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [Running tests](#running-tests)
- [Tests split by feature set](#tests-split-by-feature-set)
- [Adding new tests](#adding-new-tests)
- [Parallelism considerations](#parallelism-considerations)
- [Binary testing](#binary-testing)
- [Custom terraform scripts](#custom-terraform-scripts)
- [Environment variables](#environment-variables)
Expand Down Expand Up @@ -279,6 +280,17 @@ testacc: testunit
@sh -c "'$(CURDIR)/scripts/runtest.sh' acceptance"
```

### Parallelism considerations

When writing Terraform acceptance tests there are two ways to define tests. Either using
`resource.Test` or `resource.ParallelTest`. The former runs tests sequentially one by one while the
later runs all the tests (which are defined to be run in parallel) instantiated this way in
parallel. This is useful because it can speed up total test execution time. However one must be sure
that the tests defined for parallel run are not clashing with each other.

By default `make testacc` runs acceptance tests with parallelism enabled (for the tests which are
defined with `resource.ParallelTest`). If there is a need to troubleshoot or simply force the tests
to run sequentially - `make seqtestacc` can be used to achieve it.

## Binary testing

Expand Down

0 comments on commit 255479b

Please sign in to comment.