aboutsummaryrefslogtreecommitdiff
path: root/test/common-utils/devcontainer-info.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/common-utils/devcontainer-info.sh')
-rwxr-xr-xtest/common-utils/devcontainer-info.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/common-utils/devcontainer-info.sh b/test/common-utils/devcontainer-info.sh
new file mode 100755
index 0000000..65a4a40
--- /dev/null
+++ b/test/common-utils/devcontainer-info.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check_info() {
+ local info=$1
+ check "devcontainer-info ${info}" sh -c "devcontainer-info | grep test-${info}"
+}
+
+# Definition specific tests
+check "user" bash -c "whoami | grep vscode"
+check_info "version"
+check_info "id"
+check_info "variant"
+check_info "repository"
+check_info "release"
+check_info "revision"
+check_info "time"
+check_info "url"
+
+# Report result
+reportResults