MCPcopy Create free account
hub / github.com/cli/cli / TestWaitForWorkflowRunStatusStopsWhenRunCompletes

Function TestWaitForWorkflowRunStatusStopsWhenRunCompletes

acceptance/acceptance_test.go:556–569  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

554}
555
556func TestWaitForWorkflowRunStatusStopsWhenRunCompletes(t *testing.T) {
557 // Given a workflow run that completed before reaching the expected status
558 view := func() (string, error) {
559 return "completed", nil
560 }
561
562 // When waiting for a status the run can no longer reach
563 err := waitForWorkflowRunStatus(view, "in_progress", func(time.Duration) {
564 t.Fatal("unexpected sleep")
565 })
566
567 // Then the failed precondition is reported immediately
568 require.EqualError(t, err, `workflow run completed before reaching status "in_progress"`)
569}
570
571func TestWaitForWorkflowRunStatusTimesOut(t *testing.T) {
572 // Given a workflow run that remains queued

Callers

nothing calls this directly

Calls 1

waitForWorkflowRunStatusFunction · 0.85

Tested by

no test coverage detected