(t *testing.T)
| 349 | } |
| 350 | |
| 351 | func TestResolveWorkflowRunIDUsesDispatchOutput(t *testing.T) { |
| 352 | runID, err := resolveWorkflowRunID( |
| 353 | "https://github.com/OWNER/REPO/actions/runs/1234\n", |
| 354 | func() (string, error) { |
| 355 | t.Fatal("unexpected workflow run list") |
| 356 | return "", nil |
| 357 | }, |
| 358 | func(time.Duration) { |
| 359 | t.Fatal("unexpected sleep") |
| 360 | }, |
| 361 | ) |
| 362 | |
| 363 | require.NoError(t, err) |
| 364 | assert.Equal(t, "1234", runID) |
| 365 | } |
| 366 | |
| 367 | func TestResolveWorkflowRunIDFallsBackToPolling(t *testing.T) { |
| 368 | var attempts int |
nothing calls this directly
no test coverage detected