From 902e8e1f2a8dd7d47a6c5fc90b0aaf11c0fad718 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Wed, 26 Sep 2018 18:06:03 -0700 Subject: [PATCH] core: Fix two TestContext2Input_... tests These both just were missing some computed attributes from their schema, which was causing them to not appear in the rendered state output. --- terraform/context_input_test.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/terraform/context_input_test.go b/terraform/context_input_test.go index 8aea6cef7..f6b5a4f36 100644 --- a/terraform/context_input_test.go +++ b/terraform/context_input_test.go @@ -6,14 +6,12 @@ import ( "sync" "testing" - "github.com/hashicorp/terraform/addrs" - "github.com/hashicorp/terraform/providers" - - "github.com/hashicorp/terraform/states" - "github.com/zclconf/go-cty/cty" + "github.com/hashicorp/terraform/addrs" "github.com/hashicorp/terraform/configs/configschema" + "github.com/hashicorp/terraform/providers" + "github.com/hashicorp/terraform/states" ) func TestContext2Input(t *testing.T) { @@ -357,10 +355,9 @@ func TestContext2Input_providerOnly(t *testing.T) { ResourceTypes: map[string]*configschema.Block{ "aws_instance": { Attributes: map[string]*configschema.Attribute{ - "foo": { - Type: cty.String, - Required: true, - }, + "foo": {Type: cty.String, Required: true}, + "id": {Type: cty.String, Computed: true}, + "type": {Type: cty.String, Computed: true}, }, }, }, @@ -753,8 +750,10 @@ func TestContext2Input_hcl(t *testing.T) { ResourceTypes: map[string]*configschema.Block{ "hcl_instance": { Attributes: map[string]*configschema.Attribute{ - "foo": {Type: cty.List(cty.String), Optional: true}, - "bar": {Type: cty.Map(cty.String), Optional: true}, + "foo": {Type: cty.List(cty.String), Optional: true}, + "bar": {Type: cty.Map(cty.String), Optional: true}, + "id": {Type: cty.String, Computed: true}, + "type": {Type: cty.String, Computed: true}, }, }, },