Skip to content

Commit 30bd8d7

Browse files
committed
test: add test scenarios covering distros and the version option
Updates #cleanup
1 parent 7289f4a commit 30bd8d7

File tree

6 files changed

+36
-1
lines changed

6 files changed

+36
-1
lines changed

src/tailscale/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ install_curl() {
3333
dnf -y install --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 curl
3434
elif type yum > /dev/null 2>/dev/null; then
3535
yum -y install --noplugins --setopt=install_weak_deps=0 curl
36+
elif type apk > /dev/null 2>/dev/null; then
37+
apk add curl
3638
else
3739
2> echo "Unknown platform, can not automate curl install. curl is required to download tailscale"
3840
return 1

test/tailscale/scenarios.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"tailscale_on_ubuntu": {
3+
"image": "ubuntu:latest",
4+
"features": {
5+
"tailscale": {}
6+
}
7+
},
8+
"tailscale_on_alma": {
9+
"image": "almalinux:latest",
10+
"features": {
11+
"tailscale": {}
12+
}
13+
},
14+
"tailscale_version": {
15+
"image": "ubuntu:latest",
16+
"features": {
17+
"tailscale": {
18+
"version": "1.80.2"
19+
}
20+
}
21+
}
22+
}

test/tailscale/tailscale_on_alma.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test.sh

test/tailscale/tailscale_on_ubuntu.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test.sh

test/tailscale/tailscale_version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test.sh

test/tailscale/test.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@
55

66
set -e
77

8-
tailscale version --daemon
8+
source dev-container-features-test-lib
9+
10+
if [[ "$VERSION" == latest ]]; then
11+
check "Daemon: " tailscale version --daemon
12+
else
13+
check "$VERSION" tailscale version --daemon
14+
fi
15+
16+
reportResults

0 commit comments

Comments
 (0)