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