Skip to content

Commit 91f2b72

Browse files
authored
Merge pull request #22 from thediveo/develop
Develop
2 parents 8307b36 + 17d96f6 commit 91f2b72

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ doesn't support Alpine.
1616
| ----------------- | ------ | ---- | ------ | ------ | ------ |
1717
| bpftool ||||||
1818
| cni-plugins | |||||
19-
| docsify | | || ||
19+
| docsify | | ? || ? ||
2020
| go-ebpf | |||||
2121
| go-mod-upgrade | |||||
2222
| gocover | |||||

TESTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Testing & Maintenance
2+
3+
## Testing a DevContainer Feature
4+
5+
To test a particular devcontainer feature, say, `lazygit`:
6+
7+
```bash
8+
devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu-24.04 .
9+
```
10+
11+
- `--skip-scenarios` ... tests only the `test.sh` test case, but no scenario tests.
12+
- `--filter alpine --skip-autogenerated` ... tests only the `alpine` scenario
13+
(and neither `test.sh`).
14+
15+
## Installing/Upgrading the DevContainer CLI
16+
17+
```bash
18+
npm install -g @devcontainers/cli@latest
19+
```

src/gocover/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Go Coverage with Badge",
33
"id": "gocover",
4-
"version": "0.1.2",
4+
"version": "0.1.3",
55
"description": "runs Go unit tests with coverages, updating the README.md with a coverage badge.",
66
"options": {
77
"root": {

src/gocover/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ trap 'rm -rf -- "\${GOCOVERTMPDIR}"' EXIT
8282
[[ "\${ROOT}" = "true" ]] && ROOT="-exec=sudo" || unset ROOT
8383
[[ "\${RACE}" = "true" ]] && RACE="-race" || unset RACE
8484
[[ "\${VERBOSE}" = "true" ]] && VERBOSE="-v" || unset VERBOSE
85+
[[ -n "\${TAGS}" ]] && TAGS="-tags=\${TAGS}" || unset TAGS
8586
8687
[[ \${#POSARGS[@]} -eq 0 ]] && POSARGS+="./..."
8788
@@ -91,13 +92,15 @@ if [[ -n "\${ROOT+x}" ]]; then
9192
\${VERBOSE} \
9293
\${RACE} \
9394
-count=\${COUNT} \${NUM_PROGRAMS} \
95+
\${TAGS} \
9496
\${COVERPKG} \
9597
\${POSARGS[@]} -args -test.gocoverdir="\${GOCOVERTMPDIR}"
9698
fi
9799
go test -cover \
98100
\${VERBOSE} \
99101
\${RACE} \
100102
-count=\${COUNT} \${NUM_PROGRAMS} \
103+
\${TAGS} \
101104
\${COVERPKG} \
102105
\${POSARGS[@]} -args -test.gocoverdir="\${GOCOVERTMPDIR}"
103106

test/docsify/port_5678.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ EOF
1313
check "serves at port 5678" bash -c "${CMD}"
1414

1515
check "serves live-reload at port 5679" bash -c \
16-
"lsof -i :5679 -sTCP:LISTEN | awk 'NR>1 {print $1}' | grep -q 'node'"
16+
"lsof -nP -iTCP:5679 -sTCP:LISTEN | awk 'NR>1 {print \$2}' | sort -u | (read PID && ps -p \$PID -o cmd= | grep -q 'node')"
1717

1818
reportResults

0 commit comments

Comments
 (0)