8ef56b24d8be8f8d10937eff044ae266737a1068
[vpp.git] / extras / hs-test / suite_no_topo_test.go
1 package main
2
3 const (
4         singleTopoContainerVpp   = "vpp"
5         singleTopoContainerNginx = "nginx"
6
7         tapInterfaceName = "hst_tap_host"
8 )
9
10 type NoTopoSuite struct {
11         HstSuite
12 }
13
14 func (s *NoTopoSuite) SetupSuite() {
15         s.loadNetworkTopology("tap")
16
17         s.loadContainerTopology("single")
18 }
19
20 func (s *NoTopoSuite) SetupTest() {
21         s.skipIfUnconfiguring()
22         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
36         tapInterface := s.netInterfaces[tapInterfaceName]
37
38         vpp.createTap(tapInterface)
39 }