From 0a2adda28c7ad1dc7ae881f9b48944c26f67d6bc Mon Sep 17 00:00:00 2001 From: thediveo Date: Mon, 10 Nov 2025 21:03:12 +0100 Subject: [PATCH 1/3] test/fix: docsify port 5678 Signed-off-by: thediveo --- test/docsify/port_5678.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/docsify/port_5678.sh b/test/docsify/port_5678.sh index 2a83c17..c28591a 100755 --- a/test/docsify/port_5678.sh +++ b/test/docsify/port_5678.sh @@ -13,6 +13,6 @@ EOF check "serves at port 5678" bash -c "${CMD}" check "serves live-reload at port 5679" bash -c \ - "lsof -i :5679 -sTCP:LISTEN | awk 'NR>1 {print $1}' | grep -q 'node'" + "lsof -nP -iTCP:5679 -sTCP:LISTEN | awk 'NR>1 {print \$2}' | sort -u | (read PID && ps -p \$PID -o cmd= | grep -q 'node')" reportResults From 2e3f7f7f3c9e5bf29fb6c06c6d70c83c3e4749d1 Mon Sep 17 00:00:00 2001 From: thediveo Date: Fri, 28 Nov 2025 18:30:02 +0100 Subject: [PATCH 2/3] fix: gocover feature ignoring tags configuration Signed-off-by: thediveo --- README.md | 2 +- TESTING.md | 19 +++++++++++++++++++ src/gocover/devcontainer-feature.json | 2 +- src/gocover/install.sh | 3 +++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 TESTING.md diff --git a/README.md b/README.md index 01bcc0c..0f641ca 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ doesn't support Alpine. | ----------------- | ------ | ---- | ------ | ------ | ------ | | bpftool | ✅ | ✅ | ✅ | ✅ | ✅ | | cni-plugins | | ✅ | ✅ | ✅ | ✅ | -| docsify | | ✅ | ✅ | ✅ | ✅ | +| docsify | | ? | ✅ | ? | ✅ | | go-ebpf | | ✅ | ✅ | ✅ | ✅ | | go-mod-upgrade | | ✅ | ✅ | ✅ | ✅ | | gocover | | ✅ | ✅ | ✅ | ✅ | diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..62db522 --- /dev/null +++ b/TESTING.md @@ -0,0 +1,19 @@ +# Testing & Maintenance + +## Testing a DevContainer Feature + +To test a particular devcontainer feature, say, `lazygit`: + +```bash +devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu-24.0 . +``` + +- `--skip-scenarios` ... tests only the `test.sh` test case, but no scenario tests. +- `--filter alpine --skip-autogenerated` ... tests only the `alpine` scenario + (and neither `test.sh`). + +## Installing/Upgrading the DevContainer CLI + +```bash +npm install -g @devcontainers/cli@latest +``` diff --git a/src/gocover/devcontainer-feature.json b/src/gocover/devcontainer-feature.json index 09b1721..da5c808 100644 --- a/src/gocover/devcontainer-feature.json +++ b/src/gocover/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Go Coverage with Badge", "id": "gocover", - "version": "0.1.2", + "version": "0.1.3", "description": "runs Go unit tests with coverages, updating the README.md with a coverage badge.", "options": { "root": { diff --git a/src/gocover/install.sh b/src/gocover/install.sh index aba0198..6ebf242 100755 --- a/src/gocover/install.sh +++ b/src/gocover/install.sh @@ -82,6 +82,7 @@ trap 'rm -rf -- "\${GOCOVERTMPDIR}"' EXIT [[ "\${ROOT}" = "true" ]] && ROOT="-exec=sudo" || unset ROOT [[ "\${RACE}" = "true" ]] && RACE="-race" || unset RACE [[ "\${VERBOSE}" = "true" ]] && VERBOSE="-v" || unset VERBOSE +[[ -n "\${TAGS}" ]] && TAGS="-tags=\${TAGS}" || unset TAGS [[ \${#POSARGS[@]} -eq 0 ]] && POSARGS+="./..." @@ -91,6 +92,7 @@ if [[ -n "\${ROOT+x}" ]]; then \${VERBOSE} \ \${RACE} \ -count=\${COUNT} \${NUM_PROGRAMS} \ + \${TAGS} \ \${COVERPKG} \ \${POSARGS[@]} -args -test.gocoverdir="\${GOCOVERTMPDIR}" fi @@ -98,6 +100,7 @@ go test -cover \ \${VERBOSE} \ \${RACE} \ -count=\${COUNT} \${NUM_PROGRAMS} \ + \${TAGS} \ \${COVERPKG} \ \${POSARGS[@]} -args -test.gocoverdir="\${GOCOVERTMPDIR}" From 17d96f6812fe75015b747f1a6d1752b8182860c1 Mon Sep 17 00:00:00 2001 From: thediveo Date: Fri, 28 Nov 2025 18:31:33 +0100 Subject: [PATCH 3/3] docs: fix imageref in TESTING.md Signed-off-by: thediveo --- TESTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTING.md b/TESTING.md index 62db522..d57c5ec 100644 --- a/TESTING.md +++ b/TESTING.md @@ -5,7 +5,7 @@ To test a particular devcontainer feature, say, `lazygit`: ```bash -devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu-24.0 . +devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu-24.04 . ``` - `--skip-scenarios` ... tests only the `test.sh` test case, but no scenario tests.