Skip to content

feat: Download default terraform version when minor version mismatches #1775

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

Merged
merged 12 commits into from
Jun 22, 2022
Prev Previous commit
Next Next commit
unset PATH variable in cleanup
  • Loading branch information
AbhineetJain committed Jun 22, 2022
commit 6960c33b74ff6ebf1dc185290534c3f6d66479aa
4 changes: 4 additions & 0 deletions provisioner/terraform/serve_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func Test_getAbsoluteBinaryPath(t *testing.T) {
if actualOk != tt.expectedOk {
t.Errorf("getAbsoluteBinaryPath() ok, actual = %v, expected %v", actualOk, tt.expectedOk)
}

t.Cleanup(func() {
t.Setenv("PATH", pathVariable)
})
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
t.Cleanup(func() {
t.Setenv("PATH", pathVariable)
})

I don't think this is needed? t.Setenv already defines a cleanup function that restores the environment in the earlier step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it along with the top level t.Parallel since this test was conflicting with some other tests.

})
}
}