blob: 12b939e435fa799f9b807d0ea023f1042115d206 [file] [log] [blame]
Filip Tehlarc204c872022-12-21 08:59:16 +01001package main
2
Maros Ondrejicka7550dd22023-02-07 20:40:27 +01003const (
4 singleTopoContainerVpp = "vpp"
5 singleTopoContainerNginx = "nginx"
6
Maros Ondrejicka40cba402023-02-23 13:19:15 +01007 tapInterfaceName = "hst_tap_host"
Maros Ondrejicka7550dd22023-02-07 20:40:27 +01008)
9
Filip Tehlarc204c872022-12-21 08:59:16 +010010type NoTopoSuite struct {
11 HstSuite
12}
13
14func (s *NoTopoSuite) SetupSuite() {
Maros Ondrejicka40cba402023-02-23 13:19:15 +010015 s.loadNetworkTopology("tap")
16
Filip Tehlarc204c872022-12-21 08:59:16 +010017 s.loadContainerTopology("single")
Maros Ondrejicka7550dd22023-02-07 20:40:27 +010018}
19
20func (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 Ondrejicka40cba402023-02-23 13:19:15 +010035 tapInterface := s.netInterfaces[tapInterfaceName]
Maros Ondrejicka7550dd22023-02-07 20:40:27 +010036
Maros Ondrejicka40cba402023-02-23 13:19:15 +010037 vpp.createTap(1, tapInterface)
Filip Tehlarc204c872022-12-21 08:59:16 +010038}