blob: 8ef56b24d8be8f8d10937eff044ae266737a1068 [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 Ondrejickae7625d02023-02-28 16:55:01 +010022 s.setupVolumes()
23 s.setupContainers()
Maros Ondrejicka7550dd22023-02-07 20:40:27 +010024
25 // Setup test conditions
26 var startupConfig Stanza
27 startupConfig.
Maros Ondrejickae7625d02023-02-28 16:55:01 +010028 newStanza("session").
29 append("enable").
30 append("use-app-socket-api").close()
Maros Ondrejicka7550dd22023-02-07 20:40:27 +010031
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 Ondrejickac2f76f42023-02-27 13:22:45 +010038 vpp.createTap(tapInterface)
Filip Tehlarc204c872022-12-21 08:59:16 +010039}