|
|
|
|
@ -121,6 +121,9 @@ func TestNodeAbstractResource_ReadResourceInstanceState(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
// This test does not configure the provider, but the mock provider will
|
|
|
|
|
// check that this was called and report errors.
|
|
|
|
|
mockProvider.ConfigureProviderCalled = true
|
|
|
|
|
|
|
|
|
|
tests := map[string]struct {
|
|
|
|
|
State *states.State
|
|
|
|
|
@ -158,6 +161,7 @@ func TestNodeAbstractResource_ReadResourceInstanceState(t *testing.T) {
|
|
|
|
|
ctx.StateState = test.State.SyncWrapper()
|
|
|
|
|
ctx.PathPath = addrs.RootModuleInstance
|
|
|
|
|
ctx.ProviderSchemaSchema = mockProvider.ProviderSchema()
|
|
|
|
|
|
|
|
|
|
ctx.ProviderProvider = providers.Interface(mockProvider)
|
|
|
|
|
|
|
|
|
|
got, readDiags := test.Node.readResourceInstanceState(ctx, test.Node.Addr.Resource.Instance(addrs.NoKey).Absolute(addrs.RootModuleInstance))
|
|
|
|
|
@ -183,6 +187,9 @@ func TestNodeAbstractResource_ReadResourceInstanceStateDeposed(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
// This test does not configure the provider, but the mock provider will
|
|
|
|
|
// check that this was called and report errors.
|
|
|
|
|
mockProvider.ConfigureProviderCalled = true
|
|
|
|
|
|
|
|
|
|
tests := map[string]struct {
|
|
|
|
|
State *states.State
|
|
|
|
|
|