You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/cloud/e2e
Sebastian Rivera 015f795ff0
Rebrand Terraform Cloud to HCP Terraform
2 years ago
..
README.md Apply suggestions from code review 2 years ago
apply_auto_approve_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
apply_no_input_flag_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
backend_apply_before_init_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
env_variables_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
helper_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
init_with_empty_tags_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
main_test.go Update copyright file headers to BUSL-1.1 3 years ago
migrate_state_multi_to_tfc_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
migrate_state_remote_backend_to_tfc_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
migrate_state_single_to_tfc_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
migrate_state_tfc_to_other_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
migrate_state_tfc_to_tfc_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago
run_variables_test.go Rebrand Terraform Cloud to HCP Terraform 2 years ago

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 an HCP Terraform or Terraform Enterprise 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 HCP Terraform or Terraform Enterprise, and manipulating the Prerelease during build is often the only way to ensure this. (More on -ldflags.)