terraform: cleanup and failing test for CBD
This commit is contained in:
parent
6e632ec2ba
commit
046faf247a
|
@ -51,7 +51,6 @@ func (t *CBDEdgeTransformer) Transform(g *Graph) error {
|
||||||
|
|
||||||
// Find the destroy edge. There should only be one.
|
// Find the destroy edge. There should only be one.
|
||||||
for _, e := range g.EdgesTo(v) {
|
for _, e := range g.EdgesTo(v) {
|
||||||
log.Printf("WHAT: %#v", e)
|
|
||||||
// Not a destroy edge, ignore it
|
// Not a destroy edge, ignore it
|
||||||
de, ok := e.(*DestroyEdge)
|
de, ok := e.(*DestroyEdge)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
func TestCBDEdgeTransformer(t *testing.T) {
|
func TestCBDEdgeTransformer(t *testing.T) {
|
||||||
g := Graph{Path: RootModulePath}
|
g := Graph{Path: RootModulePath}
|
||||||
g.Add(&graphNodeCreatorTest{AddrString: "test.A"})
|
g.Add(&graphNodeCreatorTest{AddrString: "test.A"})
|
||||||
|
g.Add(&graphNodeCreatorTest{AddrString: "test.B"})
|
||||||
g.Add(&graphNodeDestroyerTest{AddrString: "test.A", CBD: true})
|
g.Add(&graphNodeDestroyerTest{AddrString: "test.A", CBD: true})
|
||||||
g.Add(&graphNodeDestroyerTest{AddrString: "test.B"})
|
|
||||||
|
|
||||||
{
|
{
|
||||||
tf := &DestroyEdgeTransformer{
|
tf := &DestroyEdgeTransformer{
|
||||||
|
@ -38,6 +38,6 @@ const testTransformCBDEdgeBasicStr = `
|
||||||
test.A
|
test.A
|
||||||
test.A (destroy)
|
test.A (destroy)
|
||||||
test.A
|
test.A
|
||||||
test.B (destroy)
|
test.B
|
||||||
test.B (destroy)
|
test.B
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in New Issue