Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ doesn't support Alpine.
| ----------------- | ------ | ---- | ------ | ------ | ------ |
| bpftool | ✅ | ✅ | ✅ | ✅ | ✅ |
| cni-plugins | | ✅ | ✅ | ✅ | ✅ |
| docsify | | | ✅ | | ✅ |
| docsify | | ? | ✅ | ? | ✅ |
| go-ebpf | | ✅ | ✅ | ✅ | ✅ |
| go-mod-upgrade | | ✅ | ✅ | ✅ | ✅ |
| gocover | | ✅ | ✅ | ✅ | ✅ |
Expand Down
19 changes: 19 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -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.04 .
```

- `--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
```
2 changes: 1 addition & 1 deletion src/gocover/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
3 changes: 3 additions & 0 deletions src/gocover/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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+="./..."

Expand All @@ -91,13 +92,15 @@ if [[ -n "\${ROOT+x}" ]]; then
\${VERBOSE} \
\${RACE} \
-count=\${COUNT} \${NUM_PROGRAMS} \
\${TAGS} \
\${COVERPKG} \
\${POSARGS[@]} -args -test.gocoverdir="\${GOCOVERTMPDIR}"
fi
go test -cover \
\${VERBOSE} \
\${RACE} \
-count=\${COUNT} \${NUM_PROGRAMS} \
\${TAGS} \
\${COVERPKG} \
\${POSARGS[@]} -args -test.gocoverdir="\${GOCOVERTMPDIR}"

Expand Down
2 changes: 1 addition & 1 deletion test/docsify/port_5678.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading