blob: 655afb6548cf8bb1b502becc3f5d56781d3eae0d [file] [log] [blame]
Filip Tehlar71fc1942023-05-22 15:48:51 +02001package main
2
3func (s *VethsSuite) TestVppEchoQuic() {
4 s.skip("quic test skipping..")
5 s.testVppEcho("quic")
6}
7
8func (s *VethsSuite) TestVppEchoUdp() {
9 s.skip("udp echo currently broken in vpp, skipping..")
10 s.testVppEcho("udp")
11}
12
13func (s *VethsSuite) TestVppEchoTcp() {
14 s.testVppEcho("tcp")
15}
16
17func (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" +
Filip Tehlar5ebdd512023-12-14 13:06:54 +010023 " socket-name " + echoSrvContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/default" +
Filip Tehlar71fc1942023-05-22 15:48:51 +020024 " 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" +
Filip Tehlar5ebdd512023-12-14 13:06:54 +010032 " socket-name " + echoClnContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/default" +
Filip Tehlar71fc1942023-05-22 15:48:51 +020033 " use-app-socket-api uri " + uri
34 s.log(clientCommand)
35 o := echoClnContainer.exec(clientCommand)
36 s.log(o)
37}