7 "github.com/stretchr/testify/suite"
10 type TapSuite struct {
15 func (s *TapSuite) SetupSuite() {
16 time.Sleep(1 * time.Second)
17 s.teardownSuite = setupSuite(&s.Suite, "tap")
20 func (s *TapSuite) TearDownSuite() {
24 type Veths2Suite struct {
29 func (s *Veths2Suite) SetupSuite() {
30 time.Sleep(1 * time.Second)
31 s.teardownSuite = setupSuite(&s.Suite, "2peerVeth")
34 func (s *Veths2Suite) TearDownSuite() {
43 func (s *NsSuite) SetupSuite() {
44 s.teardownSuite = setupSuite(&s.Suite, "ns")
47 func (s *NsSuite) TearDownSuite() {
51 func setupSuite(s *suite.Suite, topologyName string) func() {
53 topology, err := LoadTopology(TopologyDir, topologyName)
55 t.Fatalf("error on loading topology '%s': %v", topologyName, err)
57 err = topology.Configure()
59 t.Fatalf("failed to configure %s: %v", topologyName, err)
62 t.Logf("topo %s loaded", topologyName)
64 topology.Unconfigure()
68 func TestTapSuite(t *testing.T) {
73 func TestNs(t *testing.T) {
78 func TestVeths2(t *testing.T) {