File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ package acctest
2+
3+ // Package acctest provides the ability to opt-in to the new binary test driver. The binary
4+ // test driver allows you to run your acceptance tests with a binary of Terraform instead of
5+ // a source code version included with the testing code. This allows for a number of important
6+ // enhancements, but most notably a more realistic testing experience and matrix testing
7+ // against multiple versions of Terraform CLI. This also allows the SDK to be completely
8+ // separated, at a dependency level, from the Terraform CLI.
9+ //
10+ // The new test driver must be enabled by initialising the test helper in your TestMain
11+ // function in all provider packages that run acceptance tests. Most providers have only
12+ // one package.
13+ //
14+ // In v2 of the SDK, the binary test driver will be mandatory.
15+ //
16+ // After importing this package, you can add code similar to the following:
17+ //
18+ // func TestMain(m *testing.M) {
19+ // acctest.UseBinaryDriver("provider_name", Provider)
20+ // resource.TestMain(m)
21+ // }
22+ //
23+ // Some providers already have a TestMain defined, usually for the purpose of enabling test
24+ // sweepers. These additional occurrences should be removed.
25+ //
26+ // Initialising the binary test helper using UseBinaryDriver causes all tests to be run using
27+ // the new binary driver. Until SDK v2, the DisableBinaryDriver boolean property can be used
28+ // to use the legacy test driver for an individual TestCase.
29+ //
30+ // It is no longer necessary to import other Terraform providers as Go modules: these
31+ // imports should be removed.
You can’t perform that action at this time.
0 commit comments