diff options
Diffstat (limited to 'test/docker-from-docker')
-rw-r--r-- | test/docker-from-docker/docker_init.sh | 15 | ||||
-rw-r--r-- | test/docker-from-docker/scenarios.json | 11 | ||||
-rwxr-xr-x | test/docker-from-docker/test.sh | 2 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/docker-from-docker/docker_init.sh b/test/docker-from-docker/docker_init.sh new file mode 100644 index 0000000..2164921 --- /dev/null +++ b/test/docker-from-docker/docker_init.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +check "docker-init-exists" bash -c "ls /usr/local/share/docker-init.sh" +check "log-exists" bash -c "ls /tmp/vscr-docker-from-docker.log" +check "log-contents-for-success" bash -c "cat /tmp/vscr-docker-from-docker.log | grep 'Success'" +check "log-contents" bash -c "cat /tmp/vscr-docker-from-docker.log | grep 'Proxying /var/run/docker-host.sock to /var/run/docker.sock for vscode'" +check "docker-ps" bash -c "docker ps" + +# Report result +reportResults
\ No newline at end of file diff --git a/test/docker-from-docker/scenarios.json b/test/docker-from-docker/scenarios.json new file mode 100644 index 0000000..196e00b --- /dev/null +++ b/test/docker-from-docker/scenarios.json @@ -0,0 +1,11 @@ +{ + "docker_init": { + "image": "mcr.microsoft.com/devcontainers/base", + "remoteUser": "vscode", + "features": { + "docker-from-docker": { + "version": "latest" + } + } + } +} diff --git a/test/docker-from-docker/test.sh b/test/docker-from-docker/test.sh index 3a802b5..517737a 100755 --- a/test/docker-from-docker/test.sh +++ b/test/docker-from-docker/test.sh @@ -7,6 +7,8 @@ source dev-container-features-test-lib # Definition 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" # Report result reportResults
\ No newline at end of file |