Maros Ondrejicka | c2f76f4 | 2023-02-27 13:22:45 +0100 | [diff] [blame] | 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "github.com/edwarnicke/exechelper" |
| 5 | ) |
| 6 | |
Adrian Villin | cee15aa | 2024-03-14 11:42:55 -0400 | [diff] [blame] | 7 | func init() { |
| 8 | registerNginxTests(MirroringTest) |
| 9 | } |
| 10 | |
| 11 | func MirroringTest(s *NginxSuite) { |
adrianvillin | 28bd8f0 | 2024-02-13 06:00:02 -0500 | [diff] [blame] | 12 | proxyAddress := s.getInterfaceByName(mirroringClientInterfaceName).peer.ip4AddressString() |
Maros Ondrejicka | c2f76f4 | 2023-02-27 13:22:45 +0100 | [diff] [blame] | 13 | |
| 14 | path := "/64B.json" |
| 15 | |
Florin Coras | 87767d8 | 2023-03-06 09:46:11 -0800 | [diff] [blame] | 16 | testCommand := "wrk -c 20 -t 10 -d 10 http://" + proxyAddress + ":80" + path |
Maros Ondrejicka | c2f76f4 | 2023-02-27 13:22:45 +0100 | [diff] [blame] | 17 | s.log(testCommand) |
| 18 | o, _ := exechelper.Output(testCommand) |
| 19 | s.log(string(o)) |
| 20 | s.assertNotEmpty(o) |
| 21 | |
Maros Ondrejicka | c2f76f4 | 2023-02-27 13:22:45 +0100 | [diff] [blame] | 22 | vppProxyContainer := s.getContainerByName(vppProxyContainerName) |
Filip Tehlar | 543cd57 | 2023-06-27 10:01:37 +0200 | [diff] [blame] | 23 | s.assertEqual(0, vppProxyContainer.vppInstance.GetSessionStat("no lcl port")) |
Maros Ondrejicka | c2f76f4 | 2023-02-27 13:22:45 +0100 | [diff] [blame] | 24 | } |