aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/ldp_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/ldp_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/ldp_test.go')
-rw-r--r--extras/hs-test/ldp_test.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go
index 2dfdf8b4440..cbba227c328 100644
--- a/extras/hs-test/ldp_test.go
+++ b/extras/hs-test/ldp_test.go
@@ -10,12 +10,10 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() {
var clnVclConf, srvVclConf Stanza
serverContainer := s.getContainerByName("server-vpp")
- serverVolume := serverContainer.getVolumeByHostDir("/tmp/server")
- srvVcl := serverVolume.containerDir + "/vcl_srv.conf"
+ srvVcl := serverContainer.GetHostWorkDir() + "/vcl_srv.conf"
clientContainer := s.getContainerByName("client-vpp")
- clientVolume := clientContainer.getVolumeByHostDir("/tmp/client")
- clnVcl := clientVolume.containerDir + "/vcl_cln.conf"
+ clnVcl := clientContainer.GetHostWorkDir() + "/vcl_cln.conf"
ldpreload := os.Getenv("HST_LDPRELOAD")
s.assertNotEqual("", ldpreload)
@@ -28,20 +26,14 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() {
s.log("starting VPPs")
- originalWorkDir := serverContainer.workDir
- serverContainer.workDir = serverVolume.containerDir
_, err := serverContainer.execAction("Configure2Veths srv")
s.assertNil(err)
- serverContainer.workDir = originalWorkDir
- originalWorkDir = clientContainer.workDir
- clientContainer.workDir = clientVolume.containerDir
_, err = clientContainer.execAction("Configure2Veths cln")
s.assertNil(err)
- clientContainer.workDir = originalWorkDir
clientAppSocketApi := fmt.Sprintf("app-socket-api %s/var/run/app_ns_sockets/2",
- clientVolume.containerDir)
+ clientContainer.GetContainerWorkDir())
err = clnVclConf.
NewStanza("vcl").
Append("rx-fifo-size 4000000").
@@ -54,7 +46,7 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() {
s.assertNil(err)
serverAppSocketApi := fmt.Sprintf("app-socket-api %s/var/run/app_ns_sockets/1",
- serverVolume.containerDir)
+ serverContainer.GetContainerWorkDir())
err = srvVclConf.
NewStanza("vcl").
Append("rx-fifo-size 4000000").