Mizu install mode (#566)

This commit is contained in:
RoyUP9
2021-12-28 15:44:37 +02:00
committed by GitHub
parent b039c2abad
commit de046c65b0
18 changed files with 207 additions and 449 deletions

View File

@@ -13,7 +13,6 @@ import (
"strings"
"sync"
"syscall"
"testing"
"time"
"github.com/gorilla/websocket"
@@ -105,10 +104,6 @@ func getDefaultTapCommandArgs() []string {
return append([]string{tapCommand}, defaultCmdArgs...)
}
func getDefaultTapCommandArgsWithDaemonMode() []string {
return append(getDefaultTapCommandArgs(), "--daemon")
}
func getDefaultTapCommandArgsWithRegex(regex string) []string {
tapCommand := "tap"
defaultCmdArgs := getDefaultCommandArgs()
@@ -324,16 +319,6 @@ func getLogsPath() (string, error) {
return logsPath, nil
}
func daemonCleanup(t *testing.T, viewCmd *exec.Cmd) {
if err := runMizuClean(); err != nil {
t.Logf("error running mizu clean: %v", err)
}
if err := cleanupCommand(viewCmd); err != nil {
t.Logf("failed to cleanup view command, err: %v", err)
}
}
// waitTimeout waits for the waitgroup for the specified max timeout.
// Returns true if waiting timed out.
func waitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool {