aboutsummaryrefslogtreecommitdiff
path: root/test/docker-in-docker
diff options
context:
space:
mode:
authorKevin Klopfenstein <kklopfenstein@users.noreply.github.com>2022-10-21 17:31:04 +0300
committerGitHub <noreply@github.com>2022-10-21 17:31:04 +0300
commit7ae8c5c16da5f1c361ac162b25793a6c529a9cf4 (patch)
treec2ac3554824bc37c8d59455bc5354cdf86dcbbc9 /test/docker-in-docker
parent4dae930c16a0b9ec2494ea11d74e26b7a0b56689 (diff)
Add default-address-pool setting (#223)
Diffstat (limited to 'test/docker-in-docker')
-rw-r--r--test/docker-in-docker/azureDnsAutoDetectionDisabled.sh12
-rw-r--r--test/docker-in-docker/azureDnsAutoDetectionEnabled.sh12
-rw-r--r--test/docker-in-docker/dockerDefaultAddressPool.sh12
-rw-r--r--test/docker-in-docker/scenarios.json29
4 files changed, 65 insertions, 0 deletions
diff --git a/test/docker-in-docker/azureDnsAutoDetectionDisabled.sh b/test/docker-in-docker/azureDnsAutoDetectionDisabled.sh
new file mode 100644
index 0000000..d3f4159
--- /dev/null
+++ b/test/docker-in-docker/azureDnsAutoDetectionDisabled.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "dns flag should not be present" test ! "$(ps -ax | grep -E 'dockerd.+\-\-dns')"
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh b/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh
new file mode 100644
index 0000000..e63a1f3
--- /dev/null
+++ b/test/docker-in-docker/azureDnsAutoDetectionEnabled.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "dns flag should be present" ps -ax | grep -E "dockerd.+\-\-dns"
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/docker-in-docker/dockerDefaultAddressPool.sh b/test/docker-in-docker/dockerDefaultAddressPool.sh
new file mode 100644
index 0000000..8345357
--- /dev/null
+++ b/test/docker-in-docker/dockerDefaultAddressPool.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "default address pool setting set" ps -ax | grep -E "dockerd.+base=192.168.0.0/16,size=24"
+
+# 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
new file mode 100644
index 0000000..d37053a
--- /dev/null
+++ b/test/docker-in-docker/scenarios.json
@@ -0,0 +1,29 @@
+{
+ "dockerDefaultAddressPool": {
+ "image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
+ "remoteUser": "node",
+ "features": {
+ "docker-in-docker": {
+ "dockerDefaultAddressPool": "base=192.168.0.0/16,size=24"
+ }
+ }
+ },
+ "azureDnsAutoDetectionEnabled": {
+ "image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
+ "remoteUser": "node",
+ "features": {
+ "docker-in-docker": {
+ "azureDnsAutoDetection": true
+ }
+ }
+ },
+ "azureDnsAutoDetectionDisabled": {
+ "image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
+ "remoteUser": "node",
+ "features": {
+ "docker-in-docker": {
+ "azureDnsAutoDetection": false
+ }
+ }
+ }
+} \ No newline at end of file