-
Notifications
You must be signed in to change notification settings - Fork 83
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
chore(tmc): use real terraform in e2e tests #1177
Conversation
✅ Deploy Preview for terramate-io-docs canceled.
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1177 +/- ##
==========================================
+ Coverage 62.76% 62.82% +0.06%
==========================================
Files 102 102
Lines 16395 16431 +36
==========================================
+ Hits 10290 10323 +33
- Misses 5681 5683 +2
- Partials 424 425 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
58823c3
to
313ec9c
Compare
313ec9c
to
135085a
Compare
|
5cd7968
to
6b9afc7
Compare
6b9afc7
to
d11e31b
Compare
## Reasons for this change Before we used a fake terraform binary that mimicked some Terraform behavior and it supported fully customization of the program's output. The problem is that the fake terraform misses a lot of important details: - `terraform show` gives different error messages depending on different requirements not met. - `terraform show` requires an initialized terraform module and then mimicking this behavior is hard. - `terraform show` checks the lock files - etc if we ignore those details, we miss the opportunity to test those cases and improve Terramate error messages for such errors. _The error message improvements are not addressed in this PR_. ## Changes - Now during the e2e test setup, the Terraform is installed in a temp directory using the hashicorp official `hc-install` library. - Tests were updated to use a real project. - Sandbox library updated to support `copy` and `run` commands.
39180fb
to
3668835
Compare
Reasons for this change
Before we used a fake terraform binary that mimicked some Terraform behavior and it supported fully customization of the program's output.
The problem is that the fake terraform misses a lot of important details:
terraform show
gives different error messages depending on different requirements not met.terraform show
requires an initialized terraform module and then mimicking this behavior is hard.terraform show
checks the lock filesif we ignore those details, we miss the opportunity to test those cases and improve Terramate error messages for such errors.
The error message improvements are not addressed in this PR.
Changes
hc-install
library.copy
andrun
commands.