blob: daf3fc913e0fec35376e409f573e44e2b9bb01ed [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() {
Adrian Villin00e35ce2024-05-31 10:11:34 -04008 // registerNginxTests(MirroringTest)
Adrian Villincee15aa2024-03-14 11:42:55 -04009}
10
Adrian Villin0df582e2024-05-22 09:26:47 -040011// broken when CPUS > 1
Adrian Villincee15aa2024-03-14 11:42:55 -040012func MirroringTest(s *NginxSuite) {
Adrian Villin00e35ce2024-05-31 10:11:34 -040013 s.skip("Broken in the CI")
Adrian Villin0df582e2024-05-22 09:26:47 -040014 s.SkipIfMultiWorker()
adrianvillin28bd8f02024-02-13 06:00:02 -050015 proxyAddress := s.getInterfaceByName(mirroringClientInterfaceName).peer.ip4AddressString()
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010016
17 path := "/64B.json"
18
Florin Coras87767d82023-03-06 09:46:11 -080019 testCommand := "wrk -c 20 -t 10 -d 10 http://" + proxyAddress + ":80" + path
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010020 s.log(testCommand)
21 o, _ := exechelper.Output(testCommand)
22 s.log(string(o))
23 s.assertNotEmpty(o)
24
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010025 vppProxyContainer := s.getContainerByName(vppProxyContainerName)
Filip Tehlar543cd572023-06-27 10:01:37 +020026 s.assertEqual(0, vppProxyContainer.vppInstance.GetSessionStat("no lcl port"))
Maros Ondrejickac2f76f42023-02-27 13:22:45 +010027}