You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add test coverage for Meta's `savedBackend` method
* Add new Meta `savedStateStore` method and test coverage
* Streamline test - remove unneeded assertions and update comments
* Remove marks from config before configuring the provider
* Remove marks from config before configuring the state store
* Add test case for savedStateStore to assert marks aren't passed
* Fix call to ConfigureStateStore
* Show that tests pass despite not trying to remove marks
* Allow Config methods to add marks when reading pluggable state store config from the backend state file
* This code is now necessary to let the tests pass
* Stop adding marks to PSS-related config when it's parsed from the backend state file
* Stop removing marks that aren't there
* Remove unnecessary test related to marks
// Assert that the state store is configured using backend state file values from the fixtures
2464
+
config:=req.Config.AsValueMap()
2465
+
ifconfig["region"].AsString() !="old-value" {
2466
+
t.Fatalf("expected the provider to be configured with values from the backend state file (the string \"old-value\"), not the config. Got: %#v", config)
// Assert that the state store is configured using backend state file values from the fixtures
2472
+
config:=req.Config.AsValueMap()
2473
+
ifconfig["value"].AsString() !="old-value" {
2474
+
t.Fatalf("expected the state store to be configured with values from the backend state file (the string \"old-value\"), not the config. Got: %#v", config)
2475
+
}
2476
+
return providers.ConfigureStateStoreResponse{}
2477
+
}
2478
+
2479
+
// Code under test
2480
+
b, diags:=m.savedStateStore(sMgr, factory)
2481
+
ifdiags.HasErrors() {
2482
+
t.Fatalf("unexpected errors: %s", diags.Err())
2483
+
}
2484
+
2485
+
if_, ok:=b.(*pluggable.Pluggable); !ok {
2486
+
t.Fatalf(
2487
+
"expected savedStateStore to return a backend.Backend interface with concrete type %s, but got something else: %#v",
2488
+
"*pluggable.Pluggable",
2489
+
b,
2490
+
)
2491
+
}
2492
+
})
2493
+
2494
+
// NOTE: the mock's functions include assertions about the values passed to
2495
+
// the ConfigureProvider and ConfigureStateStore methods
0 commit comments