mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
fix: attempt to fix tests on windows
This commit is contained in:
parent
ee944d9640
commit
cdefa3c9d3
1 changed files with 3 additions and 3 deletions
|
@ -6,11 +6,13 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
testEnvFile = "test.env"
|
// fix for weird bug on windows github action
|
||||||
|
testEnvFile = strings.Replace(filepath.Join(os.TempDir(), "test.env"), "C:\\Users\\RUNNER", "", 1)
|
||||||
testEnvData = map[string]string{
|
testEnvData = map[string]string{
|
||||||
"people": "shit",
|
"people": "shit",
|
||||||
"moo": "boo",
|
"moo": "boo",
|
||||||
|
@ -20,8 +22,6 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func setup(t testing.TB, envFile bool, envFileData bool) {
|
func setup(t testing.TB, envFile bool, envFileData bool) {
|
||||||
testEnvFile = filepath.Join(t.TempDir(), "test.env")
|
|
||||||
|
|
||||||
teardown(t)
|
teardown(t)
|
||||||
|
|
||||||
if envFile {
|
if envFile {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue