From aa9d88ad3cca6bfd530cc97b34b71b7fb18f6c34 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 1 Jun 2018 11:29:50 -0700 Subject: [PATCH] core: Schema for TestContext2Apply_multiProviderDestroy This test depends on having a correct schema, so we'll specify the minimum schema for its fixture inline here rather than using the superset schema returned by testProvider. --- terraform/context_apply_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 91961e6ec..edc908ac7 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -3300,10 +3300,34 @@ func TestContext2Apply_multiProviderDestroyChild(t *testing.T) { p := testProvider("aws") p.ApplyFn = testApplyFn p.DiffFn = testDiffFn + p.GetSchemaReturn = &ProviderSchema{ + Provider: &configschema.Block{ + Attributes: map[string]*configschema.Attribute{ + "value": {Type: cty.String, Optional: true}, + }, + }, + ResourceTypes: map[string]*configschema.Block{ + "aws_instance": { + Attributes: map[string]*configschema.Attribute{ + "foo": {Type: cty.String, Optional: true}, + }, + }, + }, + } p2 := testProvider("vault") p2.ApplyFn = testApplyFn p2.DiffFn = testDiffFn + p2.GetSchemaReturn = &ProviderSchema{ + Provider: &configschema.Block{}, + ResourceTypes: map[string]*configschema.Block{ + "vault_instance": { + Attributes: map[string]*configschema.Attribute{ + "id": {Type: cty.String, Computed: true}, + }, + }, + }, + } var state *State