MCPcopy Index your code
hub / github.com/rilldata/rill / waitForGithubRepo

Function waitForGithubRepo

cli/cmd/deploy/deploy_test.go:516–531  ·  view source on GitHub ↗
(t *testing.T, client *github.Client, owner, repo string)

Source from the content-addressed store, hash-verified

514}
515
516func waitForGithubRepo(t *testing.T, client *github.Client, owner, repo string) {
517 t.Helper()
518 ctx, cancel := context.WithTimeout(t.Context(), 2*time.Minute)
519 defer cancel()
520 for {
521 select {
522 case <-ctx.Done():
523 require.NoError(t, ctx.Err(), "timed out waiting for github repo %s/%s to be ready", owner, repo)
524 case <-time.After(2 * time.Second):
525 }
526 _, _, err := client.Repositories.Get(ctx, owner, repo)
527 if err == nil {
528 return
529 }
530 }
531}

Callers 2

testSelfHostedDeployFunction · 0.85

Calls 4

DoneMethod · 0.80
ContextMethod · 0.65
ErrMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected