aboutsummaryrefslogtreecommitdiffstats
path: root/extras/hs-test/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/utils.go')
-rw-r--r--extras/hs-test/utils.go63
1 files changed, 0 insertions, 63 deletions
diff --git a/extras/hs-test/utils.go b/extras/hs-test/utils.go
index c5889035c40..f912880a78a 100644
--- a/extras/hs-test/utils.go
+++ b/extras/hs-test/utils.go
@@ -1,55 +1,15 @@
package main
import (
- "encoding/json"
"errors"
"fmt"
"io"
- "io/ioutil"
"os"
"os/exec"
"strings"
"time"
)
-// TODO remove `configTemplate` once its usage has been replaced everywhere with VppConfig
-const configTemplate = `unix {
- nodaemon
- log %[1]s/var/log/vpp/vpp.log
- full-coredump
- cli-listen %[1]s/var/run/vpp/cli.sock
- runtime-dir %[1]s/var/run
- gid vpp
-}
-
-api-trace {
- on
-}
-
-api-segment {
- gid vpp
-}
-
-socksvr {
- socket-name %[1]s/var/run/vpp/api.sock
-}
-
-statseg {
- socket-name %[1]s/var/run/vpp/stats.sock
-}
-
-plugins {
- plugin default { disable }
-
- plugin unittest_plugin.so { enable }
- plugin quic_plugin.so { enable }
- plugin af_packet_plugin.so { enable }
- plugin hs_apps_plugin.so { enable }
- plugin http_plugin.so { enable }
-}
-
-`
-
const vclTemplate = `vcl {
app-socket-api %[1]s/var/run/app_ns_sockets/%[2]s
app-scope-global
@@ -126,29 +86,6 @@ func StartClientApp(ipAddress string, env []string, clnCh chan error, clnRes cha
}
}
-func waitForSyncFile(fname string) (*JsonResult, error) {
- var res JsonResult
-
- for i := 0; i < 360; i++ {
- f, err := os.Open(fname)
- if err == nil {
- defer f.Close()
-
- data, err := ioutil.ReadFile(fname)
- if err != nil {
- return nil, fmt.Errorf("read error: %v", err)
- }
- err = json.Unmarshal(data, &res)
- if err != nil {
- return nil, fmt.Errorf("json unmarshal error: %v", err)
- }
- return &res, nil
- }
- time.Sleep(1 * time.Second)
- }
- return nil, fmt.Errorf("no sync file found")
-}
-
func assertFileSize(f1, f2 string) error {
fi1, err := os.Stat(f1)
if err != nil {