aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Spicer <josh@joshspicer.com>2022-05-13 03:07:22 +0300
committerGitHub <noreply@github.com>2022-05-13 03:07:22 +0300
commit5332b952adf7e31a744bba297b5232a7000de58a (patch)
tree4779f859439df52d82e2effeaba0b075d83add54
parent3e7c0308db4005644b21c0626ba6239271cf04cc (diff)
add feature stubs for all
-rw-r--r--.github/workflows/test.yaml2
-rw-r--r--.vscode/launch.json55
-rw-r--r--dev-containers-cli-0.1.0.tgzbin263276 -> 263428 bytes
-rwxr-xr-xgen.py32
-rwxr-xr-x[-rw-r--r--]src/aws-cli/install.sh0
-rw-r--r--src/python/feature.json17
-rw-r--r--test/anaconda/test.sh12
-rw-r--r--test/aws-cli/install.sh12
-rw-r--r--test/azure-cli/test.sh13
-rw-r--r--test/common/test.sh14
-rw-r--r--test/desktop-lite/test.sh12
-rw-r--r--test/docker-from-docker/test.sh13
-rw-r--r--test/docker-in-docker/test.sh13
-rw-r--r--test/dotnet/test.sh4
-rw-r--r--test/git-lfs/test.sh13
-rw-r--r--test/git/test.sh13
-rw-r--r--test/github-cli/test.sh13
-rw-r--r--test/go/test.sh4
-rw-r--r--test/gradle/test.sh13
-rw-r--r--test/hugo/test.sh13
-rw-r--r--test/java/test.sh13
-rw-r--r--test/jupyterlab/test.sh13
-rw-r--r--test/kubectl-helm-minikube/test.sh14
-rw-r--r--test/maven/test.sh13
-rw-r--r--test/node/test.sh13
-rw-r--r--test/powershell/test.sh13
-rw-r--r--test/python/test.sh13
-rw-r--r--test/ruby/test.sh13
-rw-r--r--test/rust/test.sh13
-rw-r--r--test/sshd/test.sh12
-rw-r--r--test/terraform/test.sh12
31 files changed, 402 insertions, 8 deletions
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 81c4203..67b473e 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- features: [ "go", "dotnet", "go,dotnet" ]
+ features: [ "go", "dotnet", "go,dotnet" ]
baseImage: [ "mcr.microsoft.com/vscode/devcontainers/base:focal" ]
steps:
- uses: actions/checkout@v2
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..46388dd
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,55 @@
+{
+ "configurations": [
+ {
+ "name": "Test All Features",
+ "type": "node",
+ "program": "/home/codespace/.nodejs/current/bin/npx",
+ "args": [
+ "-y",
+ "dev-containers-cli-0.1.0.tgz",
+ "features-test",
+ "-d",
+ "/workspaces/features",
+ "-f",
+ "${input:selectedFeatures}"
+ ],
+ "console": "integratedTerminal",
+ "cwd": "${workspaceFolder}",
+ "autoAttachChildProcesses": false,
+ "request": "launch",
+ },
+ {
+ "name": "Test Features (input)",
+ "type": "node",
+ "program": "/home/codespace/.nodejs/current/bin/npx",
+ "args": [
+ "-y",
+ "dev-containers-cli-0.1.0.tgz",
+ "features-test",
+ "--directory",
+ "/workspaces/features",
+ "--features",
+ "${input:selectedFeatures}",
+ "--base-image",
+ "${input:selectedBaseImage}"
+ ],
+ "console": "integratedTerminal",
+ "cwd": "${workspaceFolder}",
+ "autoAttachChildProcesses": false,
+ "request": "launch",
+ }
+ ],
+ "inputs": [
+ {
+ "id": "selectedFeatures",
+ "type": "promptString",
+ "description": "Comma separated list of features to test",
+ },
+ {
+ "id": "selectedBaseImage",
+ "type": "promptString",
+ "description": "Base Image",
+ "default": "mcr.microsoft.com/vscode/devcontainers/base:focal"
+ }
+ ]
+} \ No newline at end of file
diff --git a/dev-containers-cli-0.1.0.tgz b/dev-containers-cli-0.1.0.tgz
index f086a56..7d80fb3 100644
--- a/dev-containers-cli-0.1.0.tgz
+++ b/dev-containers-cli-0.1.0.tgz
Binary files differ
diff --git a/gen.py b/gen.py
new file mode 100755
index 0000000..ee4aea4
--- /dev/null
+++ b/gen.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+
+import os
+
+featureDirs = os.listdir('./src')
+
+
+count = len(featureDirs)
+
+for fDir in featureDirs:
+ if os.path.isdir('./test/' + fDir):
+ print('already exists: ', fDir)
+ continue
+
+ os.mkdir('./test/' + fDir)
+ f = open(f'./test/{fDir}/test.sh', 'w')
+
+ contents = f"""
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" {fDir} --version
+
+ # Report result
+ reportResults"""
+
+ f.write(contents)
diff --git a/src/aws-cli/install.sh b/src/aws-cli/install.sh
index 0d204de..0d204de 100644..100755
--- a/src/aws-cli/install.sh
+++ b/src/aws-cli/install.sh
diff --git a/src/python/feature.json b/src/python/feature.json
index 18728f3..f451eb2 100644
--- a/src/python/feature.json
+++ b/src/python/feature.json
@@ -5,7 +5,15 @@
"options": {
"version": {
"type": "string",
- "enum": ["latest", "os-provided", "3.10", "3.9", "3.8", "3.7", "3.6"],
+ "enum": [
+ "latest",
+ "os-provided",
+ "3.10",
+ "3.9",
+ "3.8",
+ "3.7",
+ "3.6"
+ ],
"default": "os-provided",
"description": "Select a Python version to install."
},
@@ -36,7 +44,10 @@
"PIPX_BIN_DIR": "/usr/local/py-utils/bin",
"PATH": "${PYTHON_PATH}/bin:${PATH}:${PIPX_BIN_DIR}"
},
- "extensions": ["ms-python.python", "ms-python.vscode-pylance"],
+ "extensions": [
+ "ms-python.python",
+ "ms-python.vscode-pylance"
+ ],
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
@@ -53,4 +64,4 @@
"app": "",
"file": "install.sh"
}
-}
+} \ No newline at end of file
diff --git a/test/anaconda/test.sh b/test/anaconda/test.sh
new file mode 100644
index 0000000..511291a
--- /dev/null
+++ b/test/anaconda/test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "version" conda --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/aws-cli/install.sh b/test/aws-cli/install.sh
new file mode 100644
index 0000000..d213eac
--- /dev/null
+++ b/test/aws-cli/install.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "version" aws --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/azure-cli/test.sh b/test/azure-cli/test.sh
new file mode 100644
index 0000000..d91c689
--- /dev/null
+++ b/test/azure-cli/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" az --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/common/test.sh b/test/common/test.sh
new file mode 100644
index 0000000..773c66f
--- /dev/null
+++ b/test/common/test.sh
@@ -0,0 +1,14 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "jq" jq --version
+ check "curl" curl --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/desktop-lite/test.sh b/test/desktop-lite/test.sh
new file mode 100644
index 0000000..f9bf160
--- /dev/null
+++ b/test/desktop-lite/test.sh
@@ -0,0 +1,12 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ echo 'NO TESTS FOR ME YET!'
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/docker-from-docker/test.sh b/test/docker-from-docker/test.sh
new file mode 100644
index 0000000..22878ba
--- /dev/null
+++ b/test/docker-from-docker/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" docker --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/docker-in-docker/test.sh b/test/docker-in-docker/test.sh
new file mode 100644
index 0000000..22878ba
--- /dev/null
+++ b/test/docker-in-docker/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" docker --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/dotnet/test.sh b/test/dotnet/test.sh
index 781fc16..ddba7a6 100644
--- a/test/dotnet/test.sh
+++ b/test/dotnet/test.sh
@@ -2,8 +2,8 @@
set -e
-# Import test library
-source featuresTest.library.sh root
+# Optional: Import test library
+source dev-container-features-test-lib
# Definition specific tests
check "dotnet" dotnet --info
diff --git a/test/git-lfs/test.sh b/test/git-lfs/test.sh
new file mode 100644
index 0000000..321b0d9
--- /dev/null
+++ b/test/git-lfs/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" git-lfs --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/git/test.sh b/test/git/test.sh
new file mode 100644
index 0000000..f78d6f9
--- /dev/null
+++ b/test/git/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" git --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/github-cli/test.sh b/test/github-cli/test.sh
new file mode 100644
index 0000000..4ff9d2c
--- /dev/null
+++ b/test/github-cli/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" gh --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/go/test.sh b/test/go/test.sh
index a41e89a..87cc950 100644
--- a/test/go/test.sh
+++ b/test/go/test.sh
@@ -2,8 +2,8 @@
set -e
-# Import test library
-source featuresTest.library.sh root
+# Optional: Import test library
+source dev-container-features-test-lib
check "version" go version
diff --git a/test/gradle/test.sh b/test/gradle/test.sh
new file mode 100644
index 0000000..5931ee7
--- /dev/null
+++ b/test/gradle/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" gradle --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/hugo/test.sh b/test/hugo/test.sh
new file mode 100644
index 0000000..b4d6636
--- /dev/null
+++ b/test/hugo/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" hugo version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/java/test.sh b/test/java/test.sh
new file mode 100644
index 0000000..ab4526e
--- /dev/null
+++ b/test/java/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" java --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/jupyterlab/test.sh b/test/jupyterlab/test.sh
new file mode 100644
index 0000000..be927b7
--- /dev/null
+++ b/test/jupyterlab/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" jupyter --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/kubectl-helm-minikube/test.sh b/test/kubectl-helm-minikube/test.sh
new file mode 100644
index 0000000..7114896
--- /dev/null
+++ b/test/kubectl-helm-minikube/test.sh
@@ -0,0 +1,14 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "kube" kubectl
+ check "helm" helm version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/maven/test.sh b/test/maven/test.sh
new file mode 100644
index 0000000..63cfb0f
--- /dev/null
+++ b/test/maven/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" maven --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/node/test.sh b/test/node/test.sh
new file mode 100644
index 0000000..cbe7309
--- /dev/null
+++ b/test/node/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" node --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/powershell/test.sh b/test/powershell/test.sh
new file mode 100644
index 0000000..aec5d1e
--- /dev/null
+++ b/test/powershell/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" pwsh --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/python/test.sh b/test/python/test.sh
new file mode 100644
index 0000000..f65ce6c
--- /dev/null
+++ b/test/python/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" python --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/ruby/test.sh b/test/ruby/test.sh
new file mode 100644
index 0000000..9560308
--- /dev/null
+++ b/test/ruby/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" ruby --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/rust/test.sh b/test/rust/test.sh
new file mode 100644
index 0000000..bc625c3
--- /dev/null
+++ b/test/rust/test.sh
@@ -0,0 +1,13 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ # Definition specific tests
+ check "version" rust --version
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/sshd/test.sh b/test/sshd/test.sh
new file mode 100644
index 0000000..f9bf160
--- /dev/null
+++ b/test/sshd/test.sh
@@ -0,0 +1,12 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ echo 'NO TESTS FOR ME YET!'
+
+ # Report result
+ reportResults \ No newline at end of file
diff --git a/test/terraform/test.sh b/test/terraform/test.sh
new file mode 100644
index 0000000..f9bf160
--- /dev/null
+++ b/test/terraform/test.sh
@@ -0,0 +1,12 @@
+
+ #!/bin/bash
+
+ set -e
+
+ # Optional: Import test library
+ source dev-container-features-test-lib
+
+ echo 'NO TESTS FOR ME YET!'
+
+ # Report result
+ reportResults \ No newline at end of file