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
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
features:
- azure-cli-persistence
- shell-history
- dev-tunnels
steps:
- uses: actions/checkout@v4

Expand Down
3 changes: 2 additions & 1 deletion test-project/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"extensions": "containerapp,ssh"
},
"./src/shell-history": {},
"./src/azure-cli-persistence": {}
"./src/azure-cli-persistence": {},
"./src/dev-tunnels" : {}
}
}
1 change: 1 addition & 0 deletions test-project/DevTunnels/devtunnels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Version":"1.0.1401\u002B3d725ee539"}
33 changes: 0 additions & 33 deletions test/_global/color_and_hello.sh

This file was deleted.

13 changes: 0 additions & 13 deletions test/_global/scenarios.json

This file was deleted.

21 changes: 21 additions & 0 deletions test/dev-tunnels/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -e

# Optional: Import test library bundled with the devcontainer CLI
# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
# Provides the 'check' and 'reportResults' commands.
source dev-container-features-test-lib

# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
# check <LABEL> <cmd> [args...]

# NOTE: currently have to run the test using zsh as the devtunnel install script only adds the PATH to the first shell config it finds
# and when running as root in the dev container base image used for testing, that is .zshrc
# check "Check devtunnel is installed" zsh --interactive -c "devtunnel --version" | grep 'Tunnel CLI'

check "Check devtunnel is installed" bash -c "devtunnel --version" | grep 'Tunnel CLI'

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
8 changes: 8 additions & 0 deletions test/dev-tunnels/scenarios.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"base": {
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"dev-tunnels": {}
}
}
}
6 changes: 5 additions & 1 deletion test/dev-tunnels/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ source dev-container-features-test-lib

# NOTE: currently have to run the test using zsh as the devtunnel install script only adds the PATH to the first shell config it finds
# and when running as root in the dev container base image used for testing, that is .zshrc
check "Check devtunnel is installed" zsh --interactive -c "devtunnel --version" | grep 'Tunnel CLI'
# check "Check devtunnel is installed" zsh --interactive -c "devtunnel --version" | grep 'Tunnel CLI'

devtunnel --version

check "Check devtunnel is installed" bash -c "devtunnel --version" | grep 'Tunnel CLI'

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
Expand Down