Filip Tehlar | 71fc194 | 2023-05-22 15:48:51 +0200 | [diff] [blame^] | 1 | package main |
| 2 | |
| 3 | func (s *VethsSuite) TestVppEchoQuic() { |
| 4 | s.skip("quic test skipping..") |
| 5 | s.testVppEcho("quic") |
| 6 | } |
| 7 | |
| 8 | func (s *VethsSuite) TestVppEchoUdp() { |
| 9 | s.skip("udp echo currently broken in vpp, skipping..") |
| 10 | s.testVppEcho("udp") |
| 11 | } |
| 12 | |
| 13 | func (s *VethsSuite) TestVppEchoTcp() { |
| 14 | s.testVppEcho("tcp") |
| 15 | } |
| 16 | |
| 17 | func (s *VethsSuite) testVppEcho(proto string) { |
| 18 | serverVethAddress := s.netInterfaces["vppsrv"].ip4AddressString() |
| 19 | uri := proto + "://" + serverVethAddress + "/12344" |
| 20 | |
| 21 | echoSrvContainer := s.getContainerByName("server-app") |
| 22 | serverCommand := "vpp_echo server TX=RX" + |
| 23 | " socket-name " + echoSrvContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/1" + |
| 24 | " use-app-socket-api" + |
| 25 | " uri " + uri |
| 26 | s.log(serverCommand) |
| 27 | echoSrvContainer.execServer(serverCommand) |
| 28 | |
| 29 | echoClnContainer := s.getContainerByName("client-app") |
| 30 | |
| 31 | clientCommand := "vpp_echo client" + |
| 32 | " socket-name " + echoClnContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/2" + |
| 33 | " use-app-socket-api uri " + uri |
| 34 | s.log(clientCommand) |
| 35 | o := echoClnContainer.exec(clientCommand) |
| 36 | s.log(o) |
| 37 | } |