diff options
author | Adrian Villin <avillin@cisco.com> | 2024-06-14 09:32:39 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2024-06-14 18:10:26 +0000 |
commit | 4677d920c0b0ff1f1aae81fb2f0052d939a2e89c (patch) | |
tree | 9c1adf90f6c1a977b622c1d0211e0e86d1bef985 /extras/hs-test/mirroring_test.go | |
parent | 2aa0f0da5dedcf6301c74a39b5e3749359e07e6d (diff) |
hs-test: separate infra from tests
- most functions and vars now start with a capital letter:
needed to access them outside the package that declares
them
- updated README.md
- very minor changes in MAKEFILE
Type: test
Change-Id: I4b5a194f08f09d59e372e57da6451fbb5a1de4da
Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/hs-test/mirroring_test.go')
-rw-r--r-- | extras/hs-test/mirroring_test.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/extras/hs-test/mirroring_test.go b/extras/hs-test/mirroring_test.go index 1fd15dde2f4..57099b73d98 100644 --- a/extras/hs-test/mirroring_test.go +++ b/extras/hs-test/mirroring_test.go @@ -1,26 +1,27 @@ package main import ( + . "fd.io/hs-test/infra" "github.com/edwarnicke/exechelper" ) func init() { - registerNginxTests(MirroringTest) + RegisterNginxTests(MirroringTest) } // broken when CPUS > 1 func MirroringTest(s *NginxSuite) { s.SkipIfMultiWorker() - proxyAddress := s.getInterfaceByName(mirroringClientInterfaceName).peer.ip4AddressString() + proxyAddress := s.GetInterfaceByName(MirroringClientInterfaceName).Peer.Ip4AddressString() path := "/64B.json" testCommand := "wrk -c 20 -t 10 -d 10 http://" + proxyAddress + ":80" + path - s.log(testCommand) + s.Log(testCommand) o, _ := exechelper.Output(testCommand) - s.log(string(o)) - s.assertNotEmpty(o) + s.Log(string(o)) + s.AssertNotEmpty(o) - vppProxyContainer := s.getContainerByName(vppProxyContainerName) - s.assertEqual(0, vppProxyContainer.vppInstance.GetSessionStat("no lcl port")) + vppProxyContainer := s.GetContainerByName(VppProxyContainerName) + s.AssertEqual(0, vppProxyContainer.VppInstance.GetSessionStat("no lcl port")) } |