Skip to content

Commit 8900e1e

Browse files
committed
test: Fix TestLocal_plan_withStateStore after changes
1 parent 78523cd commit 8900e1e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

internal/backend/local/backend_plan_test.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -948,20 +948,25 @@ func TestLocal_plan_withStateStore(t *testing.T) {
948948
op.PlanMode = plans.NormalMode
949949
op.PlanRefresh = true
950950
op.PlanOutPath = planPath
951-
cfg := cty.ObjectVal(map[string]cty.Value{
951+
storeCfg := cty.ObjectVal(map[string]cty.Value{
952952
"path": cty.StringVal(b.StatePath),
953953
})
954-
cfgRaw, err := plans.NewDynamicValue(cfg, cfg.Type())
954+
storeCfgRaw, err := plans.NewDynamicValue(storeCfg, storeCfg.Type())
955+
if err != nil {
956+
t.Fatal(err)
957+
}
958+
providerCfg := cty.ObjectVal(map[string]cty.Value{}) // Empty as the mock provider has no schema for the provider
959+
providerCfgRaw, err := plans.NewDynamicValue(providerCfg, providerCfg.Type())
955960
if err != nil {
956961
t.Fatal(err)
957962
}
958963
op.PlanOutStateStore = &plans.StateStore{
959964
Type: storeType,
960-
Config: cfgRaw,
965+
Config: storeCfgRaw,
961966
Provider: &plans.Provider{
962967
Source: &mockAddr,
963968
Version: providerVersion,
964-
// No config as the mock provider has no schema for the provider
969+
Config: providerCfgRaw,
965970
},
966971
Workspace: defaultWorkspace,
967972
}

0 commit comments

Comments
 (0)