File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ func TestPrimaryChdirOption(t *testing.T) {
233233 }
234234}
235235
236- // Requires TF_TEST_EXPERIMENT and TF_ACC to be set in the environment
236+ // Requires TF_TEST_EXPERIMENT to be set in the environment
237237func TestPrimary_stateStore (t * testing.T ) {
238238 if ! canRunGoBuild {
239239 // We're running in a separate-build-then-run context, so we can't
Original file line number Diff line number Diff line change 99 "errors"
1010 "fmt"
1111 "log"
12- "os"
1312 "time"
1413
1514 "github.com/zclconf/go-cty/cty"
@@ -108,8 +107,10 @@ func provider() simple {
108107 },
109108 },
110109 },
111- Actions : map [string ]providers.ActionSchema {},
112- StateStores : map [string ]providers.Schema {},
110+ Actions : map [string ]providers.ActionSchema {},
111+ StateStores : map [string ]providers.Schema {
112+ inMemStoreName : stateStoreInMemGetSchema (),
113+ },
113114 ServerCapabilities : providers.ServerCapabilities {
114115 PlanDestroy : true ,
115116 GetProviderSchemaOptional : true ,
@@ -136,12 +137,6 @@ func provider() simple {
136137 inMem : & InMemStoreSingle {}, // default workspace doesn't exist by default here; needs explicit creation via init command
137138 }
138139
139- // Only include the inmem state store in the provider when `TF_ACC` is set in the environment
140- // Excluding this from the schemas is sufficient to block usage.
141- if v := os .Getenv ("TF_ACC" ); v != "" {
142- provider .schema .StateStores [inMemStoreName ] = stateStoreInMemGetSchema ()
143- }
144-
145140 return provider
146141}
147142
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ import (
1515)
1616
1717func TestBackendLocked (t * testing.T ) {
18- t .Setenv ("TF_ACC" , "1" ) // enable using the inmem state store
19-
2018 // backend.TestBackendStateLocks assumes the default workspace exists
2119 // by default, so we need to make it exist using the method below.
2220 provider := ProviderWithDefaultWorkspace ()
@@ -37,8 +35,6 @@ func TestBackendLocked(t *testing.T) {
3735}
3836
3937func TestRemoteState (t * testing.T ) {
40- t .Setenv ("TF_ACC" , "1" ) // enable using the inmem state store
41-
4238 provider := Provider ()
4339
4440 plug , err := pluggable .NewPluggable (provider , inMemStoreName )
You can’t perform that action at this time.
0 commit comments