opentofu/internal/cloud/e2e
Christian Mesh 54d2130473
Find additional places where terraform should be replaced with tofu (#1001)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2023-12-13 07:18:43 -05:00
..
apply_auto_approve_test.go Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00
apply_no_input_flag_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
backend_apply_before_init_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
env_variables_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
helper_test.go Rename terraform to tofu in GoString method and docstrings (#576) 2023-09-26 19:09:27 +02:00
init_with_empty_tags_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
main_test.go Find additional places where terraform should be replaced with tofu (#1001) 2023-12-13 07:18:43 -05:00
migrate_state_multi_to_tfc_test.go Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00
migrate_state_remote_backend_to_tfc_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
migrate_state_single_to_tfc_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
migrate_state_tfc_to_other_test.go [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
migrate_state_tfc_to_tfc_test.go Rename terraform to tofu in GoString method and docstrings (#576) 2023-09-26 19:09:27 +02:00
README.md Rename internal/cloud to OpenTofu (#505) 2023-09-21 11:39:47 +03:00
run_variables_test.go Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00

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/opentofu/opentofu/version.Prerelease=<PRE-RELEASE>\""

Required flags

  • TF_ACC=1. This variable is used as part of tofu 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 tofu 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 OpenTofu being available in TFC/TFE, and manipulating the Prerelease during build is often the only way to ensure this. (More on -ldflags.)