(t *testing.T)
| 577 | } |
| 578 | |
| 579 | func TestBuildSafeOutputOptions(t *testing.T) { |
| 580 | options := buildSafeOutputOptions() |
| 581 | |
| 582 | // Should have options loaded from safe_outputs_tools.json |
| 583 | if len(options) == 0 { |
| 584 | t.Fatal("buildSafeOutputOptions returned no options") |
| 585 | } |
| 586 | |
| 587 | // Should not include internal tools |
| 588 | for _, opt := range options { |
| 589 | if opt.Value == "missing-tool" || opt.Value == "noop" || opt.Value == "missing-data" { |
| 590 | t.Errorf("buildSafeOutputOptions should not include internal tool %q", opt.Value) |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | // Should include common user-facing tools |
| 595 | values := make(map[string]bool) |
| 596 | for _, opt := range options { |
| 597 | values[opt.Value] = true |
| 598 | } |
| 599 | for _, expected := range []string{"create-issue", "add-comment", "create-pull-request"} { |
| 600 | if !values[expected] { |
| 601 | t.Errorf("buildSafeOutputOptions should include %q", expected) |
| 602 | } |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | func TestDetectNetworkFromRepo(t *testing.T) { |
| 607 | // detectNetworkFromRepo inspects the current directory; we exercise it |
nothing calls this directly
no test coverage detected