aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/common-utils/config-subdirectory.sh13
-rw-r--r--test/common-utils/scenarios.json10
2 files changed, 23 insertions, 0 deletions
diff --git a/test/common-utils/config-subdirectory.sh b/test/common-utils/config-subdirectory.sh
new file mode 100755
index 0000000..ba67fb6
--- /dev/null
+++ b/test/common-utils/config-subdirectory.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "owned-config-sub-directory" bash -c "ls -ld ~/.config/subdirectory | awk '{print $3}' | grep 'devcontainer'"
+check "owned-config-directory" bash -c "ls -ld ~/.config | awk '{print $3}' | grep 'devcontainer'"
+
+# Report result
+reportResults
diff --git a/test/common-utils/scenarios.json b/test/common-utils/scenarios.json
index 43d11c9..21cb940 100644
--- a/test/common-utils/scenarios.json
+++ b/test/common-utils/scenarios.json
@@ -115,6 +115,16 @@
}
}
},
+ "config-subdirectory": {
+ "image": "alpine",
+ "remoteUser": "devcontainer",
+ "features": {
+ "common-utils": {}
+ },
+ "mounts": [
+ "source=${localEnv:HOME},target=/home/devcontainer/.config/subdirectory,type=bind,readonly"
+ ]
+ },
"alpine-3-14": {
"image": "alpine:3.14",
"remoteUser": "devcontainer",