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

Function TestWaitForRepositoryReadyReturnsUnexpectedError

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

Source from the content-addressed store, hash-verified

520}
521
522func TestWaitForRepositoryReadyReturnsUnexpectedError(t *testing.T) {
523 // Given a repository readiness check that fails unexpectedly
524 check := func() (bool, error) {
525 return false, errors.New("checking repository")
526 }
527
528 // When waiting for repository initialization to finish
529 err := waitForRepositoryReady(check, func(time.Duration) {
530 t.Fatal("unexpected sleep")
531 })
532
533 // Then the unexpected failure is returned instead of retried
534 require.EqualError(t, err, "checking repository")
535}
536
537func TestWaitForWorkflowRunStatus(t *testing.T) {
538 // Given a workflow run that is registered but still queued

Callers

nothing calls this directly

Calls 1

waitForRepositoryReadyFunction · 0.85

Tested by

no test coverage detected