diff options
author | Maros Ondrejicka <maros.ondrejicka@pantheon.tech> | 2023-01-26 10:07:29 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2023-02-09 17:02:43 +0000 |
commit | ffa3f60290499bdacc37a97c49f2e794b5e1f18c (patch) | |
tree | c23820e0d91d2a1a0eef2596b0de60c06f1ea303 /extras/hs-test/http_test.go | |
parent | 7a6532bb9f3b9c429f92d11a6ccbf55638906d0a (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/http_test.go')
-rw-r--r-- | extras/hs-test/http_test.go | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go index 28d27bbcb16..52b7c39fa77 100644 --- a/extras/hs-test/http_test.go +++ b/extras/hs-test/http_test.go @@ -31,22 +31,18 @@ func (s *VethsSuite) TestHttpCli() { serverContainer := s.getContainerByName("server-vpp") clientContainer := s.getContainerByName("client-vpp") - _, err := serverContainer.execAction("Configure2Veths srv") - s.assertNil(err) - - _, err = clientContainer.execAction("Configure2Veths cln") - s.assertNil(err) - - s.log("configured IPs...") + serverVeth := s.veths["vppsrv"] - _, err = serverContainer.execAction("RunHttpCliSrv") + _, err := serverContainer.vppInstance.vppctl("http cli server") s.assertNil(err) - s.log("configured http server") + uri := "http://" + serverVeth.Address() + "/80" - o, err := clientContainer.execAction("RunHttpCliCln /show/version") + o, err := clientContainer.vppInstance.vppctl("http cli client" + + " uri " + uri + " query /show/version") s.assertNil(err) + s.log(o) s.assertContains(o, "<html>", "<html> not found in the result!") } |