diff options
Diffstat (limited to 'test/docker-in-docker')
-rwxr-xr-x | test/docker-in-docker/docker_with_on_create_command.sh | 18 | ||||
-rw-r--r-- | test/docker-in-docker/scenarios.json | 9 | ||||
-rwxr-xr-x | test/docker-in-docker/test.sh | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/test/docker-in-docker/docker_with_on_create_command.sh b/test/docker-in-docker/docker_with_on_create_command.sh new file mode 100755 index 0000000..131304a --- /dev/null +++ b/test/docker-in-docker/docker_with_on_create_command.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Feature specific tests +check "version" docker --version +check "docker-ps" bash -c "docker ps" + +check "docker-init-exists" bash -c "ls /usr/local/share/docker-init.sh" +check "log-exists" bash -c "ls /tmp/dockerd.log" +check "log-for-completion" bash -c "cat /tmp/dockerd.log | grep 'Daemon has completed initialization'" +check "log-contents" bash -c "cat /tmp/dockerd.log | grep 'API listen on /var/run/docker.sock'" + +# Report result +reportResults
\ No newline at end of file diff --git a/test/docker-in-docker/scenarios.json b/test/docker-in-docker/scenarios.json index de4e7d6..1274877 100644 --- a/test/docker-in-docker/scenarios.json +++ b/test/docker-in-docker/scenarios.json @@ -67,5 +67,14 @@ } }, "remoteUser": "node" + }, + // DO NOT REMOVE: This scenario is used by the docker-in-docker-stress-test workflow + "docker_with_on_create_command": { + "image": "mcr.microsoft.com/devcontainers/base:debian", + "features": { + "docker-in-docker": {} + }, + "remoteUser": "vscode", + "onCreateCommand": "docker ps && sleep 5s && docker ps" } } diff --git a/test/docker-in-docker/test.sh b/test/docker-in-docker/test.sh index 1eebfd2..e86a841 100755 --- a/test/docker-in-docker/test.sh +++ b/test/docker-in-docker/test.sh @@ -8,10 +8,10 @@ source dev-container-features-test-lib # Feature specific tests check "version" docker --version check "docker-init-exists" bash -c "ls /usr/local/share/docker-init.sh" +check "docker-ps" bash -c "docker ps" check "log-exists" bash -c "ls /tmp/dockerd.log" check "log-for-completion" bash -c "cat /tmp/dockerd.log | grep 'Daemon has completed initialization'" check "log-contents" bash -c "cat /tmp/dockerd.log | grep 'API listen on /var/run/docker.sock'" -check "docker-ps" bash -c "docker ps" # Report result reportResults
\ No newline at end of file |