aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/unittests_test.go
blob: 26faca572b87b2ebcb8750db90049db096334188 (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
package main

import (
	. "fd.io/hs-test/infra"
)

func init() {
	RegisterNoTopoTests(HttpUnitTest, TcpUnitTest, SvmUnitTest, SessionUnitTest)
}

func runUnitTest(s *NoTopoSuite, vppCmd string) {
	vpp := s.Containers.Vpp.VppInstance
	o := vpp.Vppctl(vppCmd)
	s.Log(o)
	s.AssertContains(o, "SUCCESS")
}

func HttpUnitTest(s *NoTopoSuite) {
	runUnitTest(s, "test http all")
}

func TcpUnitTest(s *NoTopoSuite) {
	s.SkipIfNotCoverage()
	runUnitTest(s, "test tcp all")
}

func SvmUnitTest(s *NoTopoSuite) {
	s.SkipIfNotCoverage()
	runUnitTest(s, "test svm fifo all")
}

func SessionUnitTest(s *NoTopoSuite) {
	s.SkipIfNotCoverage()
	runUnitTest(s, "test session all")
}