diff --git a/terraform/graph_config_node_test.go b/terraform/graph_config_node_test.go index 7cca96160b..4ebf9bf124 100644 --- a/terraform/graph_config_node_test.go +++ b/terraform/graph_config_node_test.go @@ -21,7 +21,7 @@ func TestGraphNodeConfigModuleExpand(t *testing.T) { node := &GraphNodeConfigModule{ Path: []string{RootModuleName, "child"}, - Module: nil, + Module: &config.Module{}, Tree: nil, } @@ -98,4 +98,6 @@ const testGraphNodeModuleExpandStr = ` aws_instance.bar aws_instance.foo aws_instance.foo + module inputs +module inputs ` diff --git a/terraform/transform_expand_test.go b/terraform/transform_expand_test.go index b63205557e..e0ee9cca26 100644 --- a/terraform/transform_expand_test.go +++ b/terraform/transform_expand_test.go @@ -57,9 +57,17 @@ type testExpandable struct { Builder GraphBuilder } -func (n *testExpandable) Expand(b GraphBuilder) (*Graph, error) { +func (n *testExpandable) Expand(b GraphBuilder) (GraphNodeSubgraph, error) { n.Builder = b - return n.Result, n.ResultError + return &testSubgraph{n.Result}, n.ResultError +} + +type testSubgraph struct { + Graph *Graph +} + +func (n *testSubgraph) Subgraph() *Graph { + return n.Graph } const testExpandTransformStr = `