terraform/internal/cloud/e2e
Barrett Clark a146a2746e Add clarifying commend and e2e test
This pull request focuses on removing the prompt to rename the default
workspace when it is empty. Functionality already exists to not migrate
an empty workspace. This commit adds some clarifying language in the
comment where we do the evaluation to know whether to ask for a new name
or not. I also added an end to end test, which I should have added to
begin with.
2021-11-16 13:05:26 -06:00
..
README.md remove build tags for cloud e2e 2021-11-11 16:33:26 -05:00
apply_auto_approve_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
backend_apply_before_init_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
helper_test.go remove build tags for cloud e2e 2021-11-11 16:33:26 -05:00
init_with_empty_tags_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
main_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
migrate_state_multi_to_tfc_test.go Add clarifying commend and e2e test 2021-11-16 13:05:26 -06:00
migrate_state_remote_backend_to_tfc_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
migrate_state_single_to_tfc_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
migrate_state_tfc_to_other_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
migrate_state_tfc_to_tfc_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
run_variables_test.go Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00

README.md

How to run tests

To run them, use:

TFE_TOKEN=<token> TFE_HOSTNAME=<hostname> TF_ACC=1 go test  ./internal/cloud/e2e/... -ldflags "-X \"github.com/hashicorp/terraform/version.Prerelease=<PRE-RELEASE>\""

Required flags

  • 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.)