http_static: fix reply data leak
[vpp.git] / extras / hs-test / framework_test.go
1 package main
2
3 import (
4         "fmt"
5         "os"
6         "path/filepath"
7         "runtime"
8         "testing"
9         "time"
10
11         . "fd.io/hs-test/infra"
12         . "github.com/onsi/ginkgo/v2"
13         . "github.com/onsi/gomega"
14 )
15
16 func getTestFilename() string {
17         _, filename, _, _ := runtime.Caller(2)
18         return filepath.Base(filename)
19 }
20
21 func TestHst(t *testing.T) {
22         if *IsVppDebug {
23                 // 30 minute timeout so that the framework won't timeout while debugging
24                 SuiteTimeout = time.Minute * 30
25         } else {
26                 SuiteTimeout = time.Minute * 5
27         }
28
29         // creates a file with PPID, used for 'make cleanup-hst'
30         ppid := fmt.Sprint(os.Getppid())
31         ppid = ppid[:len(ppid)-1]
32         f, _ := os.Create(".last_hst_ppid")
33         f.Write([]byte(ppid))
34         f.Close()
35
36         RegisterFailHandler(Fail)
37         RunSpecs(t, "HST")
38 }