Skip to content

Commit 6ca5b04

Browse files
committed
feat(feature-installer): Add test.
1 parent abef960 commit 6ca5b04

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

src/feature-installer/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "feature-installer",
33
"id": "feature-installer",
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"description": "Install \"feature-installer\" binary",
66
"documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/feature-installer",
77
"options": {

test/feature-installer/test.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
4+
set -e
5+
6+
# Optional: Import test library bundled with the devcontainer CLI
7+
# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
8+
# Provides the 'check' and 'reportResults' commands.
9+
source dev-container-features-test-lib
10+
11+
# Feature-specific tests
12+
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
13+
# check <LABEL> <cmd> [args...]
14+
15+
check "execute command" bash -c "webi --version | grep 'webi'"
16+
17+
# Report results
18+
# If any of the checks above exited with a non-zero exit code, the test will fail.
19+
reportResults

test/webinstall.dev/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ source dev-container-features-test-lib
1212
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
1313
# check <LABEL> <cmd> [args...]
1414

15-
check "execute command" bash -c "webi --version | grep 'webi'"
15+
check "execute command" bash -c "feature-installer"
1616

1717
# Report results
1818
# If any of the checks above exited with a non-zero exit code, the test will fail.

0 commit comments

Comments
 (0)