From 6d743524d778b39b1f09c77aa9a79a61295b0b85 Mon Sep 17 00:00:00 2001 From: Nick Santos Date: Wed, 20 Mar 2024 00:35:09 +0100 Subject: [PATCH] integration: use busybox for dc fixtures to speed them up / reduce flakes (#6342) Signed-off-by: Nick Santos --- integration/onedc/Dockerfile | 9 ++++----- integration/onedc/index.html | 1 + integration/onedc/main.go | 17 ----------------- integration/onedc_test.go | 2 +- 4 files changed, 6 insertions(+), 23 deletions(-) create mode 100644 integration/onedc/index.html delete mode 100644 integration/onedc/main.go diff --git a/integration/onedc/Dockerfile b/integration/onedc/Dockerfile index 878f4ecb6e..fac7c4a8c8 100644 --- a/integration/onedc/Dockerfile +++ b/integration/onedc/Dockerfile @@ -1,6 +1,5 @@ -FROM golang:1.17-alpine -RUN apk add curl -WORKDIR /go/src/github.com/tilt-dev/integration/onedc +FROM alpine +RUN apk add busybox-extras curl +WORKDIR /app ADD . . -RUN go install github.com/tilt-dev/integration/onedc -ENTRYPOINT /go/bin/onedc +ENTRYPOINT httpd -f -p 8000 diff --git a/integration/onedc/index.html b/integration/onedc/index.html new file mode 100644 index 0000000000..c7af70c582 --- /dev/null +++ b/integration/onedc/index.html @@ -0,0 +1 @@ +🍄 One-Up! 🍄 diff --git a/integration/onedc/main.go b/integration/onedc/main.go deleted file mode 100644 index 26c2cd5945..0000000000 --- a/integration/onedc/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "log" - "net/http" -) - -// One service deployed with docker-compose -func main() { - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - msg := "🍄 One-Up! 🍄" - _, _ = w.Write([]byte(msg)) - }) - - log.Println("Serving onedc on 8000") - _ = http.ListenAndServe(":8000", nil) -} diff --git a/integration/onedc_test.go b/integration/onedc_test.go index 7fe29e9c56..265d1aab52 100644 --- a/integration/onedc_test.go +++ b/integration/onedc_test.go @@ -32,7 +32,7 @@ func TestOneDockerCompose(t *testing.T) { f.CurlUntil(ctx, "onedc-web", "localhost:8000", "🍄 One-Up! 🍄") - f.ReplaceContents("main.go", "One-Up", "Two-Up") + f.ReplaceContents("index.html", "One-Up", "Two-Up") ctx, cancel = context.WithTimeout(f.ctx, time.Minute) defer cancel()