blob: 6c5a860b01c7c43b85336d6f2316be4605cea374 [file] [log] [blame]
Maros Ondrejickac2f76f42023-02-27 13:22:45 +01001package main
2
3import (
4 "github.com/edwarnicke/exechelper"
5)
6
Adrian Villincee15aa2024-03-14 11:42:55 -04007func init() {
8 registerNginxTests(MirroringTest)
9}
10
11func MirroringTest(s *NginxSuite) {
adrianvillin28bd8f02024-02-13 06:00:02 -050012 proxyAddress := s.getInterfaceByName(mirroringClientInterfaceName).peer.ip4AddressString()
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010013
14 path := "/64B.json"
15
Florin Coras87767d82023-03-06 09:46:11 -080016 testCommand := "wrk -c 20 -t 10 -d 10 http://" + proxyAddress + ":80" + path
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010017 s.log(testCommand)
18 o, _ := exechelper.Output(testCommand)
19 s.log(string(o))
20 s.assertNotEmpty(o)
21
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010022 vppProxyContainer := s.getContainerByName(vppProxyContainerName)
Filip Tehlar543cd572023-06-27 10:01:37 +020023 s.assertEqual(0, vppProxyContainer.vppInstance.GetSessionStat("no lcl port"))
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010024}