blob: 6de8f167f70d402c5f5a20600983cd5b81084e06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package main
import (
"testing"
"github.com/stretchr/testify/suite"
)
func setupSuite(s *suite.Suite, topologyName string) func() {
t := s.T()
topology, err := LoadTopology(NetworkTopologyDir, topologyName)
if err != nil {
t.Fatalf("error on loading topology '%s': %v", topologyName, err)
}
err = topology.Configure()
if err != nil {
t.Fatalf("failed to configure %s: %v", topologyName, err)
}
return func() {
if IsPersistent() {
return
}
topology.Unconfigure()
}
}
func TestTapSuite(t *testing.T) {
var m TapSuite
suite.Run(t, &m)
}
func TestNs(t *testing.T) {
var m NsSuite
suite.Run(t, &m)
}
func TestVeths(t *testing.T) {
var m VethsSuite
suite.Run(t, &m)
}
func TestNoTopo(t *testing.T) {
var m NoTopoSuite
suite.Run(t, &m)
}
|