(t *testing.T)
| 77 | } |
| 78 | |
| 79 | func TestRenderGraphProducesPNG(t *testing.T) { |
| 80 | if testing.Short() { |
| 81 | t.Skip("skips the go-graphviz rasterization under -short") |
| 82 | } |
| 83 | g := dotSampleGraph() |
| 84 | dot := graphToDOT(g, selectFullGraphNodes(g), "test") |
| 85 | out := filepath.Join(t.TempDir(), "graph.png") |
| 86 | if _, err := plugins.RenderDOTToFile(context.Background(), dot, "png", graphVizEngine, out, graphVizDPI); err != nil { |
| 87 | t.Fatalf("render failed: %v", err) |
| 88 | } |
| 89 | fi, err := os.Stat(out) |
| 90 | if err != nil || fi.Size() == 0 { |
| 91 | t.Fatalf("expected a non-empty PNG at %s: %v", out, err) |
| 92 | } |
| 93 | } |
nothing calls this directly
no test coverage detected