update comments

pull/36186/head
Samsondeen Dare 1 year ago
parent b3cb17dead
commit f41ce87644

@ -59,14 +59,15 @@ func TestGraph_cyclic(t *testing.T) {
name string
args []string
expected string
errors []string
// The cyclic errors do not maintain a consistent order, so we can't
// predict the exact output. We'll just check that the error messages
// are present for the things we know are cyclic.
errors []string
}{
{
name: "plan",
args: []string{"-type=plan"},
// The cyclic errors do not maintain a consistent order, so we can't
// predict the exact output. We'll just check that the error messages
// are present for the things we know are cyclic.
errors: []string{`Error: Cycle: test_instance.`,
`Error: Cycle: local.`},
},

@ -211,6 +211,7 @@ func (g *marshalGraph) writeBody(opts *DotOpts, w *indentWriter) {
for _, e := range g.Edges {
// only add the edge if it's not been added as part of a cycle
// or if there are duplicates.
if _, ok := dotEdges[e.Name]; !ok {
dotEdges[e.Name] = e.dot(g)
}

Loading…
Cancel
Save