Skip to content

Commit ae65335

Browse files
committed
test: Change test to build its own Terraform binary with experiments enabled
1 parent b8f9088 commit ae65335

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

internal/command/e2etest/pluggable_state_store_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ import (
1616
)
1717

1818
func TestPrimary_stateStore_workspaceCmd(t *testing.T) {
19-
if v := os.Getenv("TF_TEST_EXPERIMENTS"); v == "" {
20-
t.Skip("can't run without enabling experiments in the executable terraform binary, enable with TF_TEST_EXPERIMENTS=1")
21-
}
22-
2319
if !canRunGoBuild {
2420
// We're running in a separate-build-then-run context, so we can't
2521
// currently execute this test which depends on being able to build
@@ -28,10 +24,13 @@ func TestPrimary_stateStore_workspaceCmd(t *testing.T) {
2824
// (See the comment on canRunGoBuild's declaration for more information.)
2925
t.Skip("can't run without building a new provider executable")
3026
}
31-
t.Parallel()
3227

33-
tf := e2e.NewBinary(t, terraformBin, "testdata/full-workflow-with-state-store-fs")
34-
workspaceDirName := "states" // see test fixture value for workspace_dir
28+
t.Setenv(e2e.TestExperimentFlag, "true")
29+
terraformBin := e2e.GoBuild("github.com/hashicorp/terraform", "terraform")
30+
31+
fixturePath := filepath.Join("testdata", "full-workflow-with-state-store-fs")
32+
tf := e2e.NewBinary(t, terraformBin, fixturePath)
33+
workspaceDirName := "states" // See workspace_dir value in the configuration
3534

3635
// In order to test integration with PSS we need a provider plugin implementing a state store.
3736
// Here will build the simple6 (built with protocol v6) provider, which implements PSS.

0 commit comments

Comments
 (0)