-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix tests and remove commented code - Remove parallel for some flaky tests - Add README
- Loading branch information
1 parent
385a3ba
commit 00c0ab9
Showing
14 changed files
with
1,541 additions
and
1,387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# How to run tests | ||
|
||
To run them, use: | ||
``` | ||
TF_ACC=1 go test -tags=e2e ./internal/cloud/e2e/... -ldflags "-X \"github.com/hashicorp/terraform/version.Prerelease=<PRE-RELEASE>\"" | ||
``` | ||
|
||
Required flags | ||
* `-tags=e2e` for running e2e tests. | ||
* `TF_ACC=1`. This variable is used as part of terraform for tests that make | ||
external network calls. This is needed to run these tests. Without it, the | ||
tests do not run. | ||
* `TFE_TOKEN=<admin token>` and `TFE_HOSTNAME=<hostname>`. The helpers | ||
for these tests require admin access to a TFC/TFE instance. | ||
* `-timeout=30m`. Some of these tests take longer than the default 10m timeout for `go test`. | ||
|
||
### Flags | ||
|
||
* Use the `-v` flag for normal verbose mode. | ||
* Use the `-tfoutput` flag to print the terraform output to standard out. | ||
* Use `-ldflags` to change the version Prerelease to match a version | ||
available remotely. Some behaviors rely on the exact local version Terraform | ||
being available in TFC/TFE, and manipulating the Prerelease during build is | ||
often the only way to ensure this. | ||
[(More on `-ldflags`.)](https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.