github.com/grahambrereton-form3/tilt@v0.10.18/integration/imagetags_test.go (about) 1 //+build integration 2 3 package integration 4 5 import ( 6 "context" 7 "testing" 8 "time" 9 ) 10 11 func TestImageTags(t *testing.T) { 12 f := newK8sFixture(t, "imagetags") 13 defer f.TearDown() 14 15 f.TiltWatch() 16 17 timePerStage := time.Minute 18 ctx, cancel := context.WithTimeout(f.ctx, timePerStage) 19 defer cancel() 20 f.WaitForAllPodsReady(ctx, "app=imagetags") 21 f.WaitForAllPodsReady(ctx, "app=imagetags-stretch") 22 23 ctx, cancel = context.WithTimeout(f.ctx, timePerStage) 24 defer cancel() 25 f.CurlUntil(ctx, "http://localhost:31000/message.txt", "Hello from regular") 26 f.CurlUntil(ctx, "http://localhost:31001/message.txt", "Hello from stretch") 27 28 f.ReplaceContents("common/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 f.CurlUntil(ctx, "http://localhost:31001/message.txt", "Hello from stretch") 34 35 f.ReplaceContents("common-stretch/message.txt", "stretch", "armstrong") 36 37 ctx, cancel = context.WithTimeout(f.ctx, timePerStage) 38 defer cancel() 39 f.CurlUntil(ctx, "http://localhost:31001/message.txt", "Hello from armstrong") 40 f.CurlUntil(ctx, "http://localhost:31000/message.txt", "Hello from super unleaded") 41 }