(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestComplexGlobPatterns(t *testing.T) { |
| 111 | if os.Getenv("INTEGRATION_TEST") == "1" { |
| 112 | t.Skip("Skipping complex glob patterns test in integration mode") |
| 113 | } |
| 114 | |
| 115 | output, err := pkgstats(t, []string{"submit", "--dump-json"}, |
| 116 | WithPkgBlocklist([]string{"app-[0-9]*.pkg"}), |
| 117 | WithMirrorBlocklist([]string{"*.example.co", "*.example.net"}), |
| 118 | WithMirror("http://mirror.example.co/archlinux/$repo/os/$arch"), |
| 119 | ) |
| 120 | if err != nil { |
| 121 | t.Fatalf("Failed to run command: %v", err) |
| 122 | } |
| 123 | |
| 124 | var request submit.Request |
| 125 | if err := json.Unmarshal([]byte(output), &request); err != nil { |
| 126 | t.Fatalf("Failed to unmarshal JSON: %v", err) |
| 127 | } |
| 128 | |
| 129 | if request.Pacman.Mirror != "" { |
| 130 | t.Errorf("Expected pacman mirror to be empty, got %v", request.Pacman.Mirror) |
| 131 | } |
| 132 | if slices.Contains(request.Pacman.Packages, "app-123.pkg") { |
| 133 | t.Errorf("Expected pacman packages to not contain 'app-123.pkg'") |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | func TestSetQuietMode(t *testing.T) { |
| 138 | output, err := pkgstats(t, []string{"submit", "--quiet"}) |
nothing calls this directly
no test coverage detected