fix tests
This commit is contained in:
parent
8ec524fd13
commit
f8c320fd73
1 changed files with 8 additions and 3 deletions
|
@ -46,6 +46,11 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
t.Fatalf(err.Error())
|
t.Fatalf(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contextFileFullPath, err := filepath.Abs("./tests/context.yaml")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
Input *Config
|
Input *Config
|
||||||
|
@ -73,7 +78,7 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
},
|
},
|
||||||
expectedResult: &CrowdsecServiceCfg{
|
expectedResult: &CrowdsecServiceCfg{
|
||||||
AcquisitionDirPath: "",
|
AcquisitionDirPath: "",
|
||||||
ConsoleContextPath: "./tests/context.yaml",
|
ConsoleContextPath: contextFileFullPath,
|
||||||
AcquisitionFilePath: acquisFullPath,
|
AcquisitionFilePath: acquisFullPath,
|
||||||
ConfigDir: configDirFullPath,
|
ConfigDir: configDirFullPath,
|
||||||
DataDir: dataFullPath,
|
DataDir: dataFullPath,
|
||||||
|
@ -116,7 +121,7 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
AcquisitionDirPath: acquisDirFullPath,
|
AcquisitionDirPath: acquisDirFullPath,
|
||||||
AcquisitionFilePath: acquisFullPath,
|
AcquisitionFilePath: acquisFullPath,
|
||||||
ConfigDir: configDirFullPath,
|
ConfigDir: configDirFullPath,
|
||||||
ConsoleContextPath: "./tests/context.yaml",
|
ConsoleContextPath: contextFileFullPath,
|
||||||
HubIndexFile: hubIndexFileFullPath,
|
HubIndexFile: hubIndexFileFullPath,
|
||||||
DataDir: dataFullPath,
|
DataDir: dataFullPath,
|
||||||
HubDir: hubFullPath,
|
HubDir: hubFullPath,
|
||||||
|
@ -156,7 +161,7 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
HubIndexFile: hubIndexFileFullPath,
|
HubIndexFile: hubIndexFileFullPath,
|
||||||
DataDir: dataFullPath,
|
DataDir: dataFullPath,
|
||||||
HubDir: hubFullPath,
|
HubDir: hubFullPath,
|
||||||
ConsoleContextPath: "./tests/context.yaml",
|
ConsoleContextPath: contextFileFullPath,
|
||||||
SimulationConfig: &SimulationConfig{
|
SimulationConfig: &SimulationConfig{
|
||||||
Simulation: &falseBoolPtr,
|
Simulation: &falseBoolPtr,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue