summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/echo_test.go
diff options
context:
space:
mode:
authorMaros Ondrejicka <maros.ondrejicka@pantheon.tech>2023-01-26 10:07:29 +0100
committerFlorin Coras <florin.coras@gmail.com>2023-02-09 17:02:43 +0000
commitffa3f60290499bdacc37a97c49f2e794b5e1f18c (patch)
treec23820e0d91d2a1a0eef2596b0de60c06f1ea303 /extras/hs-test/echo_test.go
parent7a6532bb9f3b9c429f92d11a6ccbf55638906d0a (diff)
hs-test: configure VPP from test context
Instead of configuring VPP instances running inside of a container, now the configuration is going to be done from within the test context by using binary API and shared volume that exposes api socket. This converts just some of the test cases, rest is to follow. Type: test Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I87e4ab15de488f0eebb01ff514596265fc2a787f
Diffstat (limited to 'extras/hs-test/echo_test.go')
-rw-r--r--extras/hs-test/echo_test.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/extras/hs-test/echo_test.go b/extras/hs-test/echo_test.go
index 813297cef2a..1b24e08466d 100644
--- a/extras/hs-test/echo_test.go
+++ b/extras/hs-test/echo_test.go
@@ -1,18 +1,19 @@
package main
func (s *VethsSuite) TestEchoBuiltin() {
- serverContainer := s.getContainerByName("server-vpp")
- _, err := serverContainer.execAction("Configure2Veths srv")
- s.assertNil(err)
+ serverVpp := s.getContainerByName("server-vpp").vppInstance
+ serverVeth := s.veths["vppsrv"]
- clientContainer := s.getContainerByName("client-vpp")
- _, err = clientContainer.execAction("Configure2Veths cln")
+ _, err := serverVpp.vppctl("test echo server " +
+ " private-segment-size 1g fifo-size 4 no-echo" +
+ " uri tcp://" + serverVeth.Address() + "/1234")
s.assertNil(err)
- _, err = serverContainer.execAction("RunEchoSrvInternal private-segment-size 1g fifo-size 4 no-echo")
- s.assertNil(err)
+ clientVpp := s.getContainerByName("client-vpp").vppInstance
- o, err := clientContainer.execAction("RunEchoClnInternal nclients 10000 bytes 1 syn-timeout 100 test-timeout 100 no-return private-segment-size 1g fifo-size 4")
+ o, err := clientVpp.vppctl("test echo client nclients 10000 bytes 1" +
+ " syn-timeout 100 test-timeout 100 no-return private-segment-size 1g" +
+ " fifo-size 4 uri tcp://" + serverVeth.Address() + "/1234")
s.assertNil(err)
s.log(o)
}