blob: 677a47b789a85905898e254e15492505bd71d4e0 [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" +
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}