blob: 45c4278c470917c7f682a1f6f282f6d065541b33 [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) {
17 serverVethAddress := s.netInterfaces["vppsrv"].ip4AddressString()
18 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}