2023-02-27 13:22:45 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/edwarnicke/exechelper"
|
|
|
|
)
|
|
|
|
|
2024-03-14 11:42:55 -04:00
|
|
|
func init() {
|
|
|
|
registerNginxTests(MirroringTest)
|
|
|
|
}
|
|
|
|
|
2024-05-22 09:26:47 -04:00
|
|
|
// broken when CPUS > 1
|
2024-03-14 11:42:55 -04:00
|
|
|
func MirroringTest(s *NginxSuite) {
|
2024-05-22 09:26:47 -04:00
|
|
|
s.SkipIfMultiWorker()
|
2024-02-13 06:00:02 -05:00
|
|
|
proxyAddress := s.getInterfaceByName(mirroringClientInterfaceName).peer.ip4AddressString()
|
2023-02-27 13:22:45 +01:00
|
|
|
|
|
|
|
path := "/64B.json"
|
|
|
|
|
2023-03-06 09:46:11 -08:00
|
|
|
testCommand := "wrk -c 20 -t 10 -d 10 http://" + proxyAddress + ":80" + path
|
2023-02-27 13:22:45 +01:00
|
|
|
s.log(testCommand)
|
|
|
|
o, _ := exechelper.Output(testCommand)
|
|
|
|
s.log(string(o))
|
|
|
|
s.assertNotEmpty(o)
|
|
|
|
|
|
|
|
vppProxyContainer := s.getContainerByName(vppProxyContainerName)
|
2023-06-27 10:01:37 +02:00
|
|
|
s.assertEqual(0, vppProxyContainer.vppInstance.GetSessionStat("no lcl port"))
|
2023-02-27 13:22:45 +01:00
|
|
|
}
|