test: case: container_*: Use standard ping tests

This commit is contained in:
Tobias Waldekranz
2024-05-20 16:21:06 +02:00
parent dc6dffbff9
commit 74b0679cf0
3 changed files with 6 additions and 27 deletions
@@ -89,15 +89,8 @@ with infamy.Test() as test:
url = infamy.Furl(URL)
with infamy.IsolatedMacVlan(hport) as ns:
connectivity = ns.runsh(f"""
ip link set iface up
ip addr add {OURIP}/24 dev iface
ping -c1 -w5 {DUTIP} || exit 1
""")
if connectivity.returncode:
print(connectivity.stdout)
test.fail()
ns.addip(OURIP)
ns.must_reach(DUTIP)
until(lambda: url.nscheck(ns, "Kilroy was here"), attempts=10)
+2 -9
View File
@@ -68,15 +68,8 @@ with infamy.Test() as test:
url = infamy.Furl(URL)
with infamy.IsolatedMacVlan(hport) as ns:
connectivity = ns.runsh(f"""
ip link set iface up
ip addr add {OURIP}/24 dev iface
ping -c1 -w5 {DUTIP} || exit 1
""")
if connectivity.returncode:
print(connectivity.stdout)
test.fail()
ns.addip(OURIP)
ns.must_reach(DUTIP)
until(lambda: url.nscheck(ns, "It works"), attempts=10)
+2 -9
View File
@@ -92,15 +92,8 @@ with infamy.Test() as test:
url = infamy.Furl(URL)
with infamy.IsolatedMacVlan(hport) as ns:
connectivity = ns.runsh(f"""
ip link set iface up
ip addr add {OURIP}/24 dev iface
ping -c1 -w5 {DUTIP} || exit 1
""")
if connectivity.returncode:
print(connectivity.stdout)
test.fail()
ns.addip(OURIP)
ns.must_reach(DUTIP)
until(lambda: url.nscheck(ns, "It works"), attempts=10)