mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:12:02 +00:00
bazel: Add container test for s3proxy (#62893)
* Add container test for s3proxy script * Add explanatory comments * Fixup s3proxy container structure test * Update docs to mention a caveat of the setup steps * Fix hostname
This commit is contained in:
parent
1195dd9049
commit
3339660a77
@ -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.
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user