diff options
author | adrianvillin <avillin@cisco.com> | 2024-02-13 06:00:02 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-03-12 16:48:46 +0000 |
commit | 28bd8f07d33bdd70c2cac03b70911a9069e4bd50 (patch) | |
tree | 102bab11aa225339995a4dd07ea8332d1fce2212 /extras/hs-test/http_test.go | |
parent | 7a2961523ef6d58d718a9efb7809a212bb0b58b1 (diff) |
hs-test: experimental support for multiple test instances
- appending PID to interface and container names
- added a check for used IP addresses
- TestEnvoyProxyHttpTcp and TestTcpWithLoss are broken when running multiple instances
Type: test
Change-Id: Ib917079ec7cf851dee59ff9c67e74f48c7c5e3c6
Signed-off-by: adrianvillin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test/http_test.go')
-rw-r--r-- | extras/hs-test/http_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go index 068d0424555..943c8a591d4 100644 --- a/extras/hs-test/http_test.go +++ b/extras/hs-test/http_test.go @@ -7,11 +7,11 @@ import ( ) func (s *NsSuite) TestHttpTps() { - iface := s.netInterfaces[clientInterface] + iface := s.getInterfaceByName(clientInterface) client_ip := iface.ip4AddressString() port := "8080" finished := make(chan error, 1) - clientNetns := "cln" + clientNetns := s.getNetNamespaceByName("cln") container := s.getContainerByName("vpp") @@ -28,7 +28,7 @@ func (s *VethsSuite) TestHttpCli() { serverContainer := s.getContainerByName("server-vpp") clientContainer := s.getContainerByName("client-vpp") - serverVeth := s.netInterfaces[serverInterfaceName] + serverVeth := s.getInterfaceByName(serverInterfaceName) serverContainer.vppInstance.vppctl("http cli server") @@ -50,7 +50,7 @@ func (s *NoTopoSuite) TestNginxHttp3() { vpp := s.getContainerByName("vpp").vppInstance vpp.waitForApp("nginx-", 5) - serverAddress := s.netInterfaces[tapInterfaceName].peer.ip4AddressString() + serverAddress := s.getInterfaceByName(tapInterfaceName).peer.ip4AddressString() defer func() { os.Remove(query) }() curlCont := s.getContainerByName("curl") @@ -65,7 +65,7 @@ func (s *NoTopoSuite) TestHttpStaticProm() { finished := make(chan error, 1) query := "stats.prom" vpp := s.getContainerByName("vpp").vppInstance - serverAddress := s.netInterfaces[tapInterfaceName].peer.ip4AddressString() + serverAddress := s.getInterfaceByName(tapInterfaceName).peer.ip4AddressString() s.log(vpp.vppctl("http static server uri tcp://" + serverAddress + "/80 url-handlers")) s.log(vpp.vppctl("prom enable")) go s.startWget(finished, serverAddress, "80", query, "") @@ -83,7 +83,7 @@ func (s *NoTopoSuite) TestNginxAsServer() { vpp := s.getContainerByName("vpp").vppInstance vpp.waitForApp("nginx-", 5) - serverAddress := s.netInterfaces[tapInterfaceName].peer.ip4AddressString() + serverAddress := s.getInterfaceByName(tapInterfaceName).peer.ip4AddressString() defer func() { os.Remove(query) }() go s.startWget(finished, serverAddress, "80", query, "") @@ -104,7 +104,7 @@ func runNginxPerf(s *NoTopoSuite, mode, ab_or_wrk string) error { nRequests := 1000000 nClients := 1000 - serverAddress := s.netInterfaces[tapInterfaceName].peer.ip4AddressString() + serverAddress := s.getInterfaceByName(tapInterfaceName).peer.ip4AddressString() vpp := s.getContainerByName("vpp").vppInstance |