
- replaced s.GetContainerByName("xyz") with s.Containers.Xyz in tests and suites - same thing for interfaces - each suite has its own structs with containers/interfaces - structs are initialized in SetupSuite Type: test Change-Id: I5bd99605b40921b7b8c844e8650f6fb0915e9e99 Signed-off-by: Adrian Villin <avillin@cisco.com>
40 lines
1.0 KiB
Go
40 lines
1.0 KiB
Go
package main
|
|
|
|
import . "fd.io/hs-test/infra"
|
|
|
|
func init() {
|
|
RegisterVethTests(VppEchoQuicTest, VppEchoTcpTest)
|
|
}
|
|
|
|
func VppEchoQuicTest(s *VethsSuite) {
|
|
testVppEcho(s, "quic")
|
|
}
|
|
|
|
// TODO: udp echo currently broken in vpp
|
|
func VppEchoUdpTest(s *VethsSuite) {
|
|
testVppEcho(s, "udp")
|
|
}
|
|
|
|
func VppEchoTcpTest(s *VethsSuite) {
|
|
testVppEcho(s, "tcp")
|
|
}
|
|
|
|
func testVppEcho(s *VethsSuite, proto string) {
|
|
serverVethAddress := s.Interfaces.Server.Ip4AddressString()
|
|
uri := proto + "://" + serverVethAddress + "/12344"
|
|
|
|
serverCommand := "vpp_echo server TX=RX" +
|
|
" socket-name " + s.Containers.ServerApp.GetContainerWorkDir() + "/var/run/app_ns_sockets/default" +
|
|
" use-app-socket-api" +
|
|
" uri " + uri
|
|
s.Log(serverCommand)
|
|
s.Containers.ServerApp.ExecServer(true, serverCommand)
|
|
|
|
clientCommand := "vpp_echo client" +
|
|
" socket-name " + s.Containers.ClientApp.GetContainerWorkDir() + "/var/run/app_ns_sockets/default" +
|
|
" use-app-socket-api uri " + uri
|
|
s.Log(clientCommand)
|
|
o := s.Containers.ClientApp.Exec(true, clientCommand)
|
|
s.Log(o)
|
|
}
|