mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 04:15:54 +02:00
Windows Support (#1159)
This commit is contained in:
parent
a49b023a28
commit
0449ec1868
100 changed files with 3401 additions and 437 deletions
|
@ -3,6 +3,7 @@ package csconfig
|
|||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
|
@ -17,8 +18,14 @@ func TestNormalLoad(t *testing.T) {
|
|||
}
|
||||
|
||||
_, err = NewConfig("./tests/xxx.yaml", false, false)
|
||||
if fmt.Sprintf("%s", err) != "failed to read config file: open ./tests/xxx.yaml: no such file or directory" {
|
||||
t.Fatalf("unexpected error %s", err)
|
||||
if runtime.GOOS != "windows" {
|
||||
if fmt.Sprintf("%s", err) != "failed to read config file: open ./tests/xxx.yaml: no such file or directory" {
|
||||
t.Fatalf("unexpected error %s", err)
|
||||
}
|
||||
} else {
|
||||
if fmt.Sprintf("%s", err) != "failed to read config file: open ./tests/xxx.yaml: The system cannot find the file specified." {
|
||||
t.Fatalf("unexpected error %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
_, err = NewConfig("./tests/simulation.yaml", false, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue