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:
Mahmoud-Emad
2025-09-03 10:24:19 +03:00
parent 2b39801164
commit 49bf9dbf80

View File

@@ -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
}