aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/framework_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/framework_test.go')
-rw-r--r--extras/hs-test/framework_test.go46
1 files changed, 26 insertions, 20 deletions
diff --git a/extras/hs-test/framework_test.go b/extras/hs-test/framework_test.go
index 84aa570e681..a086f75a5fc 100644
--- a/extras/hs-test/framework_test.go
+++ b/extras/hs-test/framework_test.go
@@ -1,32 +1,38 @@
package main
import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "runtime"
"testing"
+ "time"
- "github.com/stretchr/testify/suite"
+ . "fd.io/hs-test/infra"
+ . "github.com/onsi/ginkgo/v2"
+ . "github.com/onsi/gomega"
)
-func TestTapSuite(t *testing.T) {
- var m TapSuite
- suite.Run(t, &m)
+func getTestFilename() string {
+ _, filename, _, _ := runtime.Caller(2)
+ return filepath.Base(filename)
}
-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 TestHst(t *testing.T) {
+ if *IsVppDebug {
+ // 30 minute timeout so that the framework won't timeout while debugging
+ SuiteTimeout = time.Minute * 30
+ } else {
+ SuiteTimeout = time.Minute * 5
+ }
-func TestNoTopo(t *testing.T) {
- var m NoTopoSuite
- suite.Run(t, &m)
-}
+ // creates a file with PPID, used for 'make cleanup-hst'
+ ppid := fmt.Sprint(os.Getppid())
+ ppid = ppid[:len(ppid)-1]
+ f, _ := os.Create(".last_hst_ppid")
+ f.Write([]byte(ppid))
+ f.Close()
-func TestNginx(t *testing.T) {
- var m NginxSuite
- suite.Run(t, &m)
+ RegisterFailHandler(Fail)
+ RunSpecs(t, "HST")
}