diff --git a/doc/dev/background-information/bazel/containers.md b/doc/dev/background-information/bazel/containers.md index 3136adcd4bf..c74d4580168 100644 --- a/doc/dev/background-information/bazel/containers.md +++ b/doc/dev/background-information/bazel/containers.md @@ -138,6 +138,13 @@ commandTests: - -u excludedOutput: ["^0"] exitCode: 0 + + # Each command in the setup section will run in a separate container and then commits a modified image to be the new base image for the test run + - name: "fetch and test sg" + setup: [["wget", "https://github.com/sourcegraph/sg/releases/download/2024-05-23-19-04-d485d76e/sg_linux_amd64", "-O", "sg"], ["chmod", "+x", "sg"]] + command: "./sg" + args: ["--help"] + expectedOutput: ["The Sourcegraph developer tool"] ``` We can now build this image _locally_ and run those tests as well. diff --git a/docker-images/blobstore/s3_proxy_image_test.yaml b/docker-images/blobstore/s3_proxy_image_test.yaml index f6bb9e74611..9b00dd4ebab 100644 --- a/docker-images/blobstore/s3_proxy_image_test.yaml +++ b/docker-images/blobstore/s3_proxy_image_test.yaml @@ -7,6 +7,15 @@ commandTests: - -u excludedOutput: ["^0"] exitCode: 0 + # This test runs as a single command, as commands run in the setup block are not executed in the same container as the command block + - name: "s3proxy test" + command: "sh" + args: [ + "-c", + "/opt/s3proxy/run-docker-container.sh >/dev/null 2>&1 & sleep 5 && curl -X PUT --write-out %{http_code} http://localhost:9000/create-bucket-test-2022-01-09-attempt0" + ] + expectedOutput: ["200"] + exitCode: 0 fileExistenceTests: - name: 'Test for run-docker-container.sh'