mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
fix test fixtures with multiple providers
Allow these to share the same backing MockProvider.
This commit is contained in:
parent
ef8f1b3e38
commit
903ae5edfd
@ -582,7 +582,9 @@ func TestContext2Apply_providerAlias(t *testing.T) {
|
||||
p.ApplyResourceChangeFn = testApplyFn
|
||||
ctx := testContext2(t, &ContextOpts{
|
||||
Providers: map[addrs.Provider]providers.Factory{
|
||||
addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p),
|
||||
addrs.NewDefaultProvider("aws"): func() (providers.Interface, error) {
|
||||
return p, nil
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -616,7 +618,9 @@ func TestContext2Apply_providerAliasConfigure(t *testing.T) {
|
||||
|
||||
ctx := testContext2(t, &ContextOpts{
|
||||
Providers: map[addrs.Provider]providers.Factory{
|
||||
addrs.NewDefaultProvider("another"): testProviderFuncFixed(p2),
|
||||
addrs.NewDefaultProvider("another"): func() (providers.Interface, error) {
|
||||
return p2, nil
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -1554,7 +1558,9 @@ func TestContext2Apply_destroyModuleVarProviderConfig(t *testing.T) {
|
||||
)
|
||||
ctx := testContext2(t, &ContextOpts{
|
||||
Providers: map[addrs.Provider]providers.Factory{
|
||||
addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p),
|
||||
addrs.NewDefaultProvider("aws"): func() (providers.Interface, error) {
|
||||
return p, nil
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -117,7 +117,9 @@ func TestContext2Input_providerMulti(t *testing.T) {
|
||||
|
||||
ctx := testContext2(t, &ContextOpts{
|
||||
Providers: map[addrs.Provider]providers.Factory{
|
||||
addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p),
|
||||
addrs.NewDefaultProvider("aws"): func() (providers.Interface, error) {
|
||||
return p, nil
|
||||
},
|
||||
},
|
||||
UIInput: inp,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user