File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2299,11 +2299,27 @@ func TestMetaBackend_reconfigureStateStoreChange(t *testing.T) {
2299
2299
return mock , nil
2300
2300
}
2301
2301
2302
+ // Create locks - these would normally be the locks derived from config
2303
+ locks := depsfile .NewLocks ()
2304
+ constraint , err := providerreqs .ParseVersionConstraints (">9.0.0" )
2305
+ if err != nil {
2306
+ t .Fatalf ("test setup failed when making constraint: %s" , err )
2307
+ }
2308
+ expectedVersionString := "9.9.9"
2309
+ expectedProviderSource := "registry.terraform.io/my-org/foo"
2310
+ locks .SetProvider (
2311
+ addrs .MustParseProviderSourceString (expectedProviderSource ),
2312
+ versions .MustParseVersion (expectedVersionString ),
2313
+ constraint ,
2314
+ []providerreqs.Hash {"h1:foo" },
2315
+ )
2316
+
2302
2317
// Get the operations backend
2303
2318
_ , beDiags := m .Backend (& BackendOpts {
2304
2319
Init : true ,
2305
2320
StateStoreConfig : mod .StateStore ,
2306
2321
ProviderFactory : factory ,
2322
+ Locks : locks ,
2307
2323
})
2308
2324
2309
2325
if ! beDiags .HasErrors () {
You can’t perform that action at this time.
0 commit comments