Skip to content

Commit ae37d72

Browse files
rbudiharsoikatz-drizly
authored andcommitted
preserve existing environment variable
1 parent d62fcc3 commit ae37d72

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

wait-for.bats

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@test "google should be immediately found" {
44
run ./wait-for google.com:80 -- echo 'success'
5-
5+
66
[ "$output" = "success" ]
77
}
88

@@ -12,3 +12,12 @@
1212
[ "$status" -ne 0 ]
1313
[ "$output" != "success" ]
1414
}
15+
16+
@test "preserve existing environment variable" {
17+
HOST=myweb.com
18+
PORT=8080
19+
run ./wait-for google.com:80 -- echo 'success'
20+
21+
[ "$(echo $HOST)" = 'myweb.com' ]
22+
[ "$(echo $PORT)" = '8080' ]
23+
}

0 commit comments

Comments
 (0)