Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/cli/health_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ func TestHealthConfigValidation(t *testing.T) {
},
}

// Stub out the GitHub API call so valid-days cases don't fall through to
// real network access (which can take tens of seconds per case, or hang,
// in sandboxed/offline test environments). Only days validation is under
// test here; run listing itself is covered by dedicated tests elsewhere.
original := healthListWorkflowRuns
t.Cleanup(func() { healthListWorkflowRuns = original })
healthListWorkflowRuns = func(opts ListWorkflowRunsOptions) ([]WorkflowRun, int, error) {
return nil, 0, nil
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := RunHealth(tt.config)
Expand Down
Loading