Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable e2e testing against custom Terraform executable #305

Merged
merged 4 commits into from
Jun 22, 2022

Conversation

kmoe
Copy link
Member

@kmoe kmoe commented May 18, 2022

If the env var TFEXEC_E2ETEST_TERRAFORM_PATH is set to the path of a valid local Terraform executable, when e2e tests are run, only tests appropriate to that executable's version will be run.

This involves both the runTest() and runTestVersions() codepaths, since both are used in e2e tests.

The code here is quite awkward due to the need to support multiple codepaths. Happy to refactor more if we prefer.

@kmoe kmoe requested a review from radeksimko May 18, 2022 15:18
@kmoe kmoe added the testing label May 18, 2022
@kmoe kmoe force-pushed the kmoe/custom-terraform-binary branch from 10f275f to 94aea70 Compare May 18, 2022 15:19
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two minor questions, but not necessarily blocking.

tfexec/internal/e2etest/util_test.go Show resolved Hide resolved
tfexec/internal/e2etest/util_test.go Show resolved Hide resolved
kmoe and others added 3 commits May 18, 2022 17:46
If the env var TFEXEC_E2ETEST_TERRAFORM_PATH is set to the path of a valid
local Terraform executable, when e2e tests are run, only tests appropriate to
that executable's version will be run.

This involves both the runTest() and runTestVersions() codepaths, since both
are used in e2e tests.
@kmoe kmoe force-pushed the kmoe/custom-terraform-binary branch from 94aea70 to f4c3a92 Compare May 18, 2022 16:46
@kmoe kmoe merged commit 66fbb39 into main Jun 22, 2022
@kmoe kmoe deleted the kmoe/custom-terraform-binary branch June 22, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants