From b190aa05a5fdc551903d00749dbd098e21f832d6 Mon Sep 17 00:00:00 2001 From: James Nugent Date: Wed, 22 Jun 2016 17:06:41 +0300 Subject: [PATCH] core: Add missing OutputStates in synthetic state In cases where we construct state directly rather than reading it via the usual methods, we need to ensure that the necessary maps are initialized correctly. --- command/command_test.go | 1 + terraform/context_refresh_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/command/command_test.go b/command/command_test.go index 283395df0..14e19ee3b 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -128,6 +128,7 @@ func testState() *terraform.State { }, }, }, + Outputs: map[string]*terraform.OutputState{}, }, }, } diff --git a/terraform/context_refresh_test.go b/terraform/context_refresh_test.go index 9f4ee58f2..12e084cb4 100644 --- a/terraform/context_refresh_test.go +++ b/terraform/context_refresh_test.go @@ -499,6 +499,7 @@ func TestContext2Refresh_outputPartial(t *testing.T) { }, }, }, + Outputs: map[string]*OutputState{}, }, }, },