terraform: fix tests
This commit is contained in:
parent
10dee0dce8
commit
daf66357f6
|
@ -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
|
||||
`
|
||||
|
|
|
@ -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 = `
|
||||
|
|
Loading…
Reference in New Issue