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 @@ -2234,11 +2234,27 @@ func TestMetaBackend_reconfigureStateStoreChange(t *testing.T) {
22342234 return mock , nil
22352235 }
22362236
2237+ // Create locks - these would normally be the locks derived from config
2238+ locks := depsfile .NewLocks ()
2239+ constraint , err := providerreqs .ParseVersionConstraints (">9.0.0" )
2240+ if err != nil {
2241+ t .Fatalf ("test setup failed when making constraint: %s" , err )
2242+ }
2243+ expectedVersionString := "9.9.9"
2244+ expectedProviderSource := "registry.terraform.io/my-org/foo"
2245+ locks .SetProvider (
2246+ addrs .MustParseProviderSourceString (expectedProviderSource ),
2247+ versions .MustParseVersion (expectedVersionString ),
2248+ constraint ,
2249+ []providerreqs.Hash {"h1:foo" },
2250+ )
2251+
22372252 // Get the operations backend
22382253 _ , beDiags := m .Backend (& BackendOpts {
22392254 Init : true ,
22402255 StateStoreConfig : mod .StateStore ,
22412256 ProviderFactory : factory ,
2257+ Locks : locks ,
22422258 })
22432259
22442260 if ! beDiags .HasErrors () {
You can’t perform that action at this time.
0 commit comments