Fix more tests on Windows (#1824)

Signed-off-by: eduzgun <emreduz00@gmail.com>
This commit is contained in:
Emre Duzgun
2024-07-17 15:41:12 +01:00
committed by GitHub
parent b6c31dfb87
commit b93acf96a9
9 changed files with 110 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ import (
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
@@ -197,7 +198,8 @@ func setupBinary() func() {
os.Exit(1)
}
// Getting top level dir
dirPaths := strings.Split(currentDir, "/")
newDir := filepath.ToSlash(currentDir)
dirPaths := strings.Split(newDir, "/")
log.Println(currentDir)
topLevel := len(dirPaths) - 3
topDir := strings.Join(dirPaths[0:topLevel], "/")