mirror of
https://github.com/thegeeklab/wait-for.git
synced 2024-11-18 10:40:39 +00:00
15 lines
311 B
Plaintext
15 lines
311 B
Plaintext
|
#!/usr/bin/env bats
|
||
|
|
||
|
@test "google should be immediately found" {
|
||
|
run ./wait-for google.com:80 -- echo 'success'
|
||
|
|
||
|
[ "$output" = "success" ]
|
||
|
}
|
||
|
|
||
|
@test "nonexistent server should not start command" {
|
||
|
run ./wait-for -t 1 noserver:9999 -- echo 'success'
|
||
|
|
||
|
[ "$status" -ne 0 ]
|
||
|
[ "$output" != "success" ]
|
||
|
}
|