From 9616618de1dae9a38667f1b64030c6e8af5b7464 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Sun, 20 Nov 2016 13:13:43 -0500 Subject: [PATCH] Make sure test has a valid ResourceState Empty resources are now pruned more aggressively, so make sure there is a valid ResourceState in the test ModuleState. --- state/cache_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/state/cache_test.go b/state/cache_test.go index 44ac34177..7252637e0 100644 --- a/state/cache_test.go +++ b/state/cache_test.go @@ -71,7 +71,11 @@ func TestCacheState_RefreshState(t *testing.T) { &terraform.ModuleState{ Path: terraform.RootModulePath, Resources: map[string]*terraform.ResourceState{ - "foo.foo": &terraform.ResourceState{}, + "foo.foo": &terraform.ResourceState{ + Primary: &terraform.InstanceState{ + ID: "ID", + }, + }, }, }, },