github.com/tilt-dev/tilt@v0.36.0/integration/oneup_custom_test.go (about)

     1  //go:build integration
     2  // +build integration
     3  
     4  package integration
     5  
     6  import (
     7  	"context"
     8  	"testing"
     9  	"time"
    10  )
    11  
    12  func TestOneUpCustom(t *testing.T) {
    13  	f := newK8sFixture(t, "oneup_custom")
    14  
    15  	f.TiltCI("oneup-custom")
    16  
    17  	// ForwardPort will fail if all the pods are not ready.
    18  	//
    19  	// We can't use the normal Tilt-managed forwards here because
    20  	// Tilt doesn't setup forwards when --watch=false.
    21  	ctx, cancel := context.WithTimeout(f.ctx, time.Minute)
    22  	defer cancel()
    23  	f.WaitForAllPodsReady(ctx, "app=oneup-custom")
    24  
    25  	f.ForwardPort("deployment/oneup-custom", "31234:8000")
    26  
    27  	ctx, cancel = context.WithTimeout(f.ctx, time.Minute)
    28  	defer cancel()
    29  	f.CurlUntil(ctx, "http://localhost:31234", "🍄 One-Up Custom! 🍄")
    30  }