mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
test: case: container_*: Use standard ping tests
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user