blob: bca1dbf1828df37223b6baeb7074b2e2a3f3f937 [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() {
Maros Ondrejickaaf004dd2023-02-27 16:52:57 +010021 s.skipIfUnconfiguring()
Maros Ondrejicka7550dd22023-02-07 20:40:27 +010022 s.SetupVolumes()
23 s.SetupContainers()
24
25 // Setup test conditions
26 var startupConfig Stanza
27 startupConfig.
28 NewStanza("session").
29 Append("enable").
30 Append("use-app-socket-api").Close()
31
32 container := s.getContainerByName(singleTopoContainerVpp)
33 vpp, _ := container.newVppInstance(startupConfig)
34 vpp.start()
35
Maros Ondrejicka40cba402023-02-23 13:19:15 +010036 tapInterface := s.netInterfaces[tapInterfaceName]
Maros Ondrejicka7550dd22023-02-07 20:40:27 +010037
Maros Ondrejicka40cba402023-02-23 13:19:15 +010038 vpp.createTap(1, tapInterface)
Filip Tehlarc204c872022-12-21 08:59:16 +010039}