github.com/tilt-dev/tilt@v0.36.0/integration/live_update_base_image_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 "github.com/stretchr/testify/assert" 12 ) 13 14 func TestLiveUpdateBaseImage(t *testing.T) { 15 f := newK8sFixture(t, "live_update_base_image") 16 17 f.TiltUp() 18 19 timePerStage := time.Minute 20 ctx, cancel := context.WithTimeout(f.ctx, timePerStage) 21 defer cancel() 22 firstBuild := f.WaitForAllPodsReady(ctx, "app=live-update-base-image") 23 24 ctx, cancel = context.WithTimeout(f.ctx, timePerStage) 25 defer cancel() 26 f.CurlUntil(ctx, "http://localhost:31000/message.txt", "Hello from regular") 27 28 f.ReplaceContents("content/message.txt", "regular", "super unleaded") 29 30 ctx, cancel = context.WithTimeout(f.ctx, timePerStage) 31 defer cancel() 32 f.CurlUntil(ctx, "http://localhost:31000/message.txt", "Hello from super unleaded") 33 34 secondBuild := f.WaitForAllPodsReady(ctx, "app=live-update-base-image") 35 assert.Equal(t, firstBuild, secondBuild) 36 }