diff options
Diffstat (limited to 'extras/hs-test/echo_test.go')
-rw-r--r-- | extras/hs-test/echo_test.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/extras/hs-test/echo_test.go b/extras/hs-test/echo_test.go index 690f6d1378e..33728db6c97 100644 --- a/extras/hs-test/echo_test.go +++ b/extras/hs-test/echo_test.go @@ -1,6 +1,11 @@ package main -func (s *VethsSuite) TestEchoBuiltin() { +func init() { + registerVethTests(EchoBuiltinTest) + registerSoloVethTests(TcpWithLossTest) +} + +func EchoBuiltinTest(s *VethsSuite) { serverVpp := s.getContainerByName("server-vpp").vppInstance serverVeth := s.getInterfaceByName(serverInterfaceName) @@ -16,7 +21,7 @@ func (s *VethsSuite) TestEchoBuiltin() { s.assertNotContains(o, "failed:") } -func (s *VethsSuite) TestTcpWithLoss() { +func TcpWithLossTest(s *VethsSuite) { serverVpp := s.getContainerByName("server-vpp").vppInstance serverVeth := s.getInterfaceByName(serverInterfaceName) @@ -26,19 +31,19 @@ func (s *VethsSuite) TestTcpWithLoss() { clientVpp := s.getContainerByName("client-vpp").vppInstance // Ensure that VPP doesn't abort itself with NSIM enabled - // Warning: Removing this ping will make the test fail! + // Warning: Removing this ping will make VPP crash! clientVpp.vppctl("ping %s", serverVeth.ip4AddressString()) // Add loss of packets with Network Delay Simulator clientVpp.vppctl("set nsim poll-main-thread delay 0.01 ms bandwidth 40 gbit" + " packet-size 1400 packets-per-drop 1000") - clientVpp.vppctl("nsim output-feature enable-disable " + s.getInterfaceByName(clientInterfaceName).name) + clientVpp.vppctl("nsim output-feature enable-disable host-" + s.getInterfaceByName(clientInterfaceName).name) // Do echo test from client-vpp container output := clientVpp.vppctl("test echo client uri tcp://%s/20022 verbose echo-bytes mbytes 50", serverVeth.ip4AddressString()) s.log(output) s.assertNotEqual(len(output), 0) - s.assertNotContains(output, "failed: timeout", output) + s.assertNotContains(output, "failed", output) } |