Filip Tehlar | c204c87 | 2022-12-21 08:59:16 +0100 | [diff] [blame] | 1 | package main |
| 2 | |
Maros Ondrejicka | 7550dd2 | 2023-02-07 20:40:27 +0100 | [diff] [blame] | 3 | const ( |
| 4 | singleTopoContainerVpp = "vpp" |
| 5 | singleTopoContainerNginx = "nginx" |
| 6 | |
Maros Ondrejicka | 40cba40 | 2023-02-23 13:19:15 +0100 | [diff] [blame] | 7 | tapInterfaceName = "hst_tap_host" |
Maros Ondrejicka | 7550dd2 | 2023-02-07 20:40:27 +0100 | [diff] [blame] | 8 | ) |
| 9 | |
Filip Tehlar | c204c87 | 2022-12-21 08:59:16 +0100 | [diff] [blame] | 10 | type NoTopoSuite struct { |
| 11 | HstSuite |
| 12 | } |
| 13 | |
| 14 | func (s *NoTopoSuite) SetupSuite() { |
Maros Ondrejicka | 40cba40 | 2023-02-23 13:19:15 +0100 | [diff] [blame] | 15 | s.loadNetworkTopology("tap") |
| 16 | |
Filip Tehlar | c204c87 | 2022-12-21 08:59:16 +0100 | [diff] [blame] | 17 | s.loadContainerTopology("single") |
Maros Ondrejicka | 7550dd2 | 2023-02-07 20:40:27 +0100 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | func (s *NoTopoSuite) SetupTest() { |
| 21 | s.SetupVolumes() |
| 22 | s.SetupContainers() |
| 23 | |
| 24 | // Setup test conditions |
| 25 | var startupConfig Stanza |
| 26 | startupConfig. |
| 27 | NewStanza("session"). |
| 28 | Append("enable"). |
| 29 | Append("use-app-socket-api").Close() |
| 30 | |
| 31 | container := s.getContainerByName(singleTopoContainerVpp) |
| 32 | vpp, _ := container.newVppInstance(startupConfig) |
| 33 | vpp.start() |
| 34 | |
Maros Ondrejicka | 40cba40 | 2023-02-23 13:19:15 +0100 | [diff] [blame] | 35 | tapInterface := s.netInterfaces[tapInterfaceName] |
Maros Ondrejicka | 7550dd2 | 2023-02-07 20:40:27 +0100 | [diff] [blame] | 36 | |
Maros Ondrejicka | 40cba40 | 2023-02-23 13:19:15 +0100 | [diff] [blame] | 37 | vpp.createTap(1, tapInterface) |
Filip Tehlar | c204c87 | 2022-12-21 08:59:16 +0100 | [diff] [blame] | 38 | } |