Credits test: show go list's stderr when the dependency graph fails
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+3
−1
internal/calendar/credits_inventory_test.go+3 −1
CI failed — run details
CI log
=== vet ===
go vet ./...
=== fmt ===
=== test ===
go test ./...
? amadan.net/oficina/calendar/cmd/calendar [no test files]
--- FAIL: TestCreditsMatchProductionDependencies (0.03s)
credits_inventory_test.go:37: production dependency graph unavailable: exit status 1
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
FAIL
FAIL amadan.net/oficina/calendar/internal/calendar 4.390s
? amadan.net/oficina/calendar/internal/calendar/icons [no test files]
? amadan.net/oficina/calendar/internal/calendar/seal [no test files]
ok amadan.net/oficina/calendar/internal/calendartest (cached)
ok amadan.net/oficina/calendar/internal/guardstest 0.038s
? amadan.net/oficina/calendar/scripts/writetheme [no test files]
FAIL
make: *** [Makefile:85: test] Error 1
amadan: step test failed: exit status 2
amadan: job failed at step test — its output is above, not at the tail of this log
diff --git a/internal/calendar/credits_inventory_test.go b/internal/calendar/credits_inventory_test.go| index faae4fa..da184f7 100644 |
| --- a/internal/calendar/credits_inventory_test.go |
| +++ b/internal/calendar/credits_inventory_test.go |
| @@ -30,9 +30,11 @@ func TestCreditsMatchProductionDependencies(t *testing.T) { |
| } |
| } |
| command.Env = append(command.Env, "GOOS=linux", "GOARCH=arm64", "CGO_ENABLED=0", "GOWORK=off") |
| + var stderr bytes.Buffer |
| + command.Stderr = &stderr |
| raw, err := command.Output() |
| if err != nil { |
| - t.Fatal("production dependency graph unavailable", err) |
| + t.Fatalf("production dependency graph unavailable: %v\n%s", err, stderr.String()) |
| } |
| inventory, err := catalog.Collect(bytes.NewReader(raw), map[string]bool{"amadan.net/oficina/estilo.git": true, "amadan.net/oficina/home/handoff": true, "amadan.net/oficina/home/connect": true, "amadan.net/rastrillo/native/server": true}) |
| if err != nil { |