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

Function TestWaitForWorkflowRunStatusTimesOut

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

Source from the content-addressed store, hash-verified

569}
570
571func TestWaitForWorkflowRunStatusTimesOut(t *testing.T) {
572 // Given a workflow run that remains queued
573 var attempts int
574 var sleeps int
575
576 // When waiting for it to start
577 err := waitForWorkflowRunStatus(func() (string, error) {
578 attempts++
579 return "queued", nil
580 }, "in_progress", func(time.Duration) {
581 sleeps++
582 })
583
584 // Then the wait stops after one minute
585 require.EqualError(t, err, `workflow run did not reach status "in_progress" within 60 seconds`)
586 assert.Equal(t, 61, attempts)
587 assert.Equal(t, 60, sleeps)
588}
589
590func TestOutputForEnvironment(t *testing.T) {
591 value, err := outputForEnvironment("1234\n")

Callers

nothing calls this directly

Calls 2

waitForWorkflowRunStatusFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected