Skip to content

Commit

Permalink
Longer timeout for install part of e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Aug 6, 2024
1 parent 2b45b4e commit 1a9fd59
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
)

const (
startTimeout = 5 * time.Second
testTimeout = 15 * time.Second
installTimeout = 30 * time.Second
startTimeout = 5 * time.Second
testTimeout = 15 * time.Second
)

func TestEndToEndTrustlessGatewayDomains(t *testing.T) {
Expand All @@ -23,18 +24,23 @@ func TestEndToEndTrustlessGatewayDomains(t *testing.T) {
t.Skip("skipping test on", runtime.GOOS)
}

ctx, cancel := context.WithTimeout(context.Background(), testTimeout)
defer cancel()

runner := testcmd.NewRunner(t, t.TempDir())

ctx, cancel := context.WithTimeout(context.Background(), installTimeout)
defer cancel()

// install rainbow
runner.Run(ctx, "go", "install", ".")
cancel()
rainbow := filepath.Join(runner.Dir, "rainbow")

args := testcmd.Args(rainbow, "--trustless-gateway-domains", "example.org")
ready := testcmd.NewStdoutWatcher("IPFS Gateway listening")
domain := testcmd.NewStdoutWatcher("RAINBOW_TRUSTLESS_GATEWAY_DOMAINS = example.org")

ctx, cancel = context.WithTimeout(context.Background(), testTimeout)
defer cancel()

cmdRainbow := runner.Start(ctx, args, ready, domain)

startCtx, startCancel := context.WithTimeout(context.Background(), startTimeout)
Expand Down

0 comments on commit 1a9fd59

Please sign in to comment.