aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/suite_no_topo_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/suite_no_topo_test.go')
-rw-r--r--extras/hs-test/suite_no_topo_test.go22
1 files changed, 5 insertions, 17 deletions
diff --git a/extras/hs-test/suite_no_topo_test.go b/extras/hs-test/suite_no_topo_test.go
index 01958b0a804..12b939e435f 100644
--- a/extras/hs-test/suite_no_topo_test.go
+++ b/extras/hs-test/suite_no_topo_test.go
@@ -4,8 +4,7 @@ const (
singleTopoContainerVpp = "vpp"
singleTopoContainerNginx = "nginx"
- tapNameVpp = "vppTap"
- tapNameHost = "hostTap"
+ tapInterfaceName = "hst_tap_host"
)
type NoTopoSuite struct {
@@ -13,19 +12,9 @@ type NoTopoSuite struct {
}
func (s *NoTopoSuite) SetupSuite() {
- s.loadContainerTopology("single")
-
- s.addresser = NewAddresser(&s.HstSuite)
-
- var vppTapDevConfig = NetDevConfig{"name": tapNameVpp}
- vppTap, _ := NewTap(vppTapDevConfig, s.addresser)
+ s.loadNetworkTopology("tap")
- var hostTapDevConfig = NetDevConfig{"name": tapNameHost}
- hostTap, _ := NewTap(hostTapDevConfig, s.addresser)
-
- s.netInterfaces = make(map[string]NetInterface)
- s.netInterfaces[vppTap.Name()] = &vppTap
- s.netInterfaces[hostTap.Name()] = &hostTap
+ s.loadContainerTopology("single")
}
func (s *NoTopoSuite) SetupTest() {
@@ -43,8 +32,7 @@ func (s *NoTopoSuite) SetupTest() {
vpp, _ := container.newVppInstance(startupConfig)
vpp.start()
- vppTapAddress := s.netInterfaces[tapNameVpp].AddressWithPrefix()
- hostTapAddress := s.netInterfaces[tapNameHost].IP4AddressWithPrefix()
+ tapInterface := s.netInterfaces[tapInterfaceName]
- vpp.createTap("tap0", hostTapAddress, vppTapAddress)
+ vpp.createTap(1, tapInterface)
}