Skip to content

Commit

Permalink
Add explicit 30s timeout to all goss assertions that pull docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
triarius committed Jun 7, 2023
1 parent 3e4cd66 commit 00e7a8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions goss.yaml
Expand Up @@ -128,32 +128,38 @@ command:
# Check docker userns is enabled
docker info --format='{{ `{{range .SecurityOptions}}{{if eq . "name=userns"}}{{"success"}}{{end}}{{end}}` }}':
exit-status: 0
timeout: 30000
stdout:
- success

# Check docker plugins are installed
docker info --format=$'{{ `{{range .ClientInfo.Plugins}}{{if eq .Name "buildx"}}success\n{{end}}{{if eq .Name "compose" }}success{{end}}{{end}}` }}':
exit-status: 0
timeout: 30000
stdout:
- success
- success

# Check that docker containers can run
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest version:
exit-status: 0
timeout: 30000

# Check that userns allows writing as buildkite-agent
sh -c 'docker run --rm -v "$PWD:/pwd" alpine:latest touch /pwd/test && stat -c %U:%G test' && rm test:
exit-status: 0
timeout: 30000
stdout:
- buildkite-agent:docker

docker run --rm -t arm64v8/ubuntu uname -m:
exit-status: 0
timeout: 30000
stdout:
- aarch64

docker run --rm -t amd64/ubuntu uname -m:
exit-status: 0
timeout: 30000
stdout:
- x86_64

0 comments on commit 00e7a8b

Please sign in to comment.