terraform: fix tests

This commit is contained in:
Mitchell Hashimoto 2015-02-11 17:07:38 -08:00
parent 10dee0dce8
commit daf66357f6
2 changed files with 13 additions and 3 deletions

View File

@ -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
`

View File

@ -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 = `