vpp/extras/hs-test/mirroring_test.go
Adrian Villin cee15aa940 hs-test: transition to ginkgo test framework
Type: test

Change-Id: Ia38bf5549d20b22876f6082085b69a52a03d0142
Signed-off-by: Adrian Villin <avillin@cisco.com>
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-19 14:52:05 +00:00

25 lines
590 B
Go

package main
import (
"github.com/edwarnicke/exechelper"
)
func init() {
registerNginxTests(MirroringTest)
}
func MirroringTest(s *NginxSuite) {
proxyAddress := s.getInterfaceByName(mirroringClientInterfaceName).peer.ip4AddressString()
path := "/64B.json"
testCommand := "wrk -c 20 -t 10 -d 10 http://" + proxyAddress + ":80" + path
s.log(testCommand)
o, _ := exechelper.Output(testCommand)
s.log(string(o))
s.assertNotEmpty(o)
vppProxyContainer := s.getContainerByName(vppProxyContainerName)
s.assertEqual(0, vppProxyContainer.vppInstance.GetSessionStat("no lcl port"))
}