2022-12-21 08:59:16 +01:00
|
|
|
package main
|
|
|
|
|
2023-02-07 20:40:27 +01:00
|
|
|
const (
|
|
|
|
singleTopoContainerVpp = "vpp"
|
|
|
|
singleTopoContainerNginx = "nginx"
|
|
|
|
|
2023-02-23 13:19:15 +01:00
|
|
|
tapInterfaceName = "hst_tap_host"
|
2023-02-07 20:40:27 +01:00
|
|
|
)
|
|
|
|
|
2022-12-21 08:59:16 +01:00
|
|
|
type NoTopoSuite struct {
|
|
|
|
HstSuite
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NoTopoSuite) SetupSuite() {
|
2023-02-23 13:19:15 +01:00
|
|
|
s.loadNetworkTopology("tap")
|
2023-02-07 20:40:27 +01:00
|
|
|
|
2023-02-23 13:19:15 +01:00
|
|
|
s.loadContainerTopology("single")
|
2023-02-07 20:40:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *NoTopoSuite) SetupTest() {
|
|
|
|
s.SetupVolumes()
|
|
|
|
s.SetupContainers()
|
|
|
|
|
|
|
|
// Setup test conditions
|
|
|
|
var startupConfig Stanza
|
|
|
|
startupConfig.
|
|
|
|
NewStanza("session").
|
|
|
|
Append("enable").
|
|
|
|
Append("use-app-socket-api").Close()
|
|
|
|
|
|
|
|
container := s.getContainerByName(singleTopoContainerVpp)
|
|
|
|
vpp, _ := container.newVppInstance(startupConfig)
|
|
|
|
vpp.start()
|
|
|
|
|
2023-02-23 13:19:15 +01:00
|
|
|
tapInterface := s.netInterfaces[tapInterfaceName]
|
2023-02-07 20:40:27 +01:00
|
|
|
|
2023-02-23 13:19:15 +01:00
|
|
|
vpp.createTap(1, tapInterface)
|
2022-12-21 08:59:16 +01:00
|
|
|
}
|