github.com/windmilleng/tilt@v0.13.6/integration/dcbuild_test.go (about) 1 //+build integration 2 3 package integration 4 5 import ( 6 "context" 7 "testing" 8 "time" 9 ) 10 11 func TestDockerComposeImageBuild(t *testing.T) { 12 f := newDCFixture(t, "dcbuild") 13 defer f.TearDown() 14 15 f.dockerKillAll("tilt") 16 f.TiltWatch() 17 18 ctx, cancel := context.WithTimeout(f.ctx, time.Minute) 19 defer cancel() 20 21 f.WaitUntil(ctx, "dcbuild up", func() (string, error) { 22 return f.dockerCmdOutput([]string{ 23 "ps", "-f", "name=dcbuild", "--format", "{{.Image}}", 24 }) 25 }, "gcr.io/windmill-test-containers/dcbuild") 26 27 f.CurlUntil(ctx, "dcbuild", "localhost:8000", "🍄 One-Up! 🍄") 28 29 f.ReplaceContents("cmd/dcbuild/main.go", "One-Up", "Two-Up") 30 31 ctx, cancel = context.WithTimeout(f.ctx, time.Minute) 32 defer cancel() 33 f.CurlUntil(ctx, "dcbuild", "localhost:8000", "🍄 Two-Up! 🍄") 34 }