test: Update ping test assertions
- Use boolean `true` for successful ping - Use boolean `false` for ping timeout - Use boolean `false` for unknown host
This commit is contained in:
@@ -7,15 +7,15 @@ fn test_ipaddr_pub_get() {
|
||||
|
||||
fn test_ping() {
|
||||
x := ping(address: '127.0.0.1', retry: 1)!
|
||||
assert x == .ok
|
||||
assert x == true
|
||||
}
|
||||
|
||||
fn test_ping_timeout() ! {
|
||||
x := ping(address: '192.168.145.154', retry: 5, nr_ok: 1)!
|
||||
assert x == .timeout
|
||||
assert x == false
|
||||
}
|
||||
|
||||
fn test_ping_unknownhost() ! {
|
||||
x := ping(address: '12.902.219.1', retry: 1, nr_ok: 1)!
|
||||
assert x == .unknownhost
|
||||
assert x == false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user