blob: 386f9bc685f4bcdfb283a2a92f0e08ccc2391ff8 [file] [log] [blame]
Filip Tehlar71fc1942023-05-22 15:48:51 +02001package main
2
3func (s *VethsSuite) TestVppEchoQuic() {
Filip Tehlar71fc1942023-05-22 15:48:51 +02004 s.testVppEcho("quic")
5}
6
Filip Tehlar94181432024-01-15 13:11:28 +01007// udp echo currently broken in vpp, skipping
8func (s *VethsSuite) SkipTestVppEchoUdp() {
Filip Tehlar71fc1942023-05-22 15:48:51 +02009 s.testVppEcho("udp")
10}
11
12func (s *VethsSuite) TestVppEchoTcp() {
13 s.testVppEcho("tcp")
14}
15
16func (s *VethsSuite) testVppEcho(proto string) {
adrianvillinfbf5f2b2024-02-13 03:26:25 -050017 serverVethAddress := s.netInterfaces[serverInterfaceName].ip4AddressString()
Filip Tehlar71fc1942023-05-22 15:48:51 +020018 uri := proto + "://" + serverVethAddress + "/12344"
19
20 echoSrvContainer := s.getContainerByName("server-app")
21 serverCommand := "vpp_echo server TX=RX" +
Filip Tehlar5ebdd512023-12-14 13:06:54 +010022 " socket-name " + echoSrvContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/default" +
Filip Tehlar71fc1942023-05-22 15:48:51 +020023 " 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 Tehlar5ebdd512023-12-14 13:06:54 +010031 " socket-name " + echoClnContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/default" +
Filip Tehlar71fc1942023-05-22 15:48:51 +020032 " use-app-socket-api uri " + uri
33 s.log(clientCommand)
34 o := echoClnContainer.exec(clientCommand)
35 s.log(o)
36}