fix tests
This commit is contained in:
parent
9cf286d0c8
commit
592bd20cc4
|
@ -82,6 +82,7 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
ParserRoutinesCount: 1,
|
ParserRoutinesCount: 1,
|
||||||
OutputRoutinesCount: 1,
|
OutputRoutinesCount: 1,
|
||||||
AcquisitionFiles: []string{acquisFullPath},
|
AcquisitionFiles: []string{acquisFullPath},
|
||||||
|
ContextToSend: make(map[string][]string, 0),
|
||||||
SimulationFilePath: "./tests/simulation.yaml",
|
SimulationFilePath: "./tests/simulation.yaml",
|
||||||
SimulationConfig: &SimulationConfig{
|
SimulationConfig: &SimulationConfig{
|
||||||
Simulation: &falseBoolPtr,
|
Simulation: &falseBoolPtr,
|
||||||
|
@ -118,6 +119,7 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
BucketsRoutinesCount: 1,
|
BucketsRoutinesCount: 1,
|
||||||
ParserRoutinesCount: 1,
|
ParserRoutinesCount: 1,
|
||||||
OutputRoutinesCount: 1,
|
OutputRoutinesCount: 1,
|
||||||
|
ContextToSend: make(map[string][]string, 0),
|
||||||
AcquisitionFiles: []string{acquisFullPath, acquisInDirFullPath},
|
AcquisitionFiles: []string{acquisFullPath, acquisInDirFullPath},
|
||||||
SimulationFilePath: "./tests/simulation.yaml",
|
SimulationFilePath: "./tests/simulation.yaml",
|
||||||
SimulationConfig: &SimulationConfig{
|
SimulationConfig: &SimulationConfig{
|
||||||
|
@ -148,6 +150,8 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
HubIndexFile: hubIndexFileFullPath,
|
HubIndexFile: hubIndexFileFullPath,
|
||||||
DataDir: dataFullPath,
|
DataDir: dataFullPath,
|
||||||
HubDir: hubFullPath,
|
HubDir: hubFullPath,
|
||||||
|
ContextToSend: make(map[string][]string, 0),
|
||||||
|
ConsoleContextPath: "/etc/crowdsec/console/context.yaml",
|
||||||
SimulationConfig: &SimulationConfig{
|
SimulationConfig: &SimulationConfig{
|
||||||
Simulation: &falseBoolPtr,
|
Simulation: &falseBoolPtr,
|
||||||
},
|
},
|
||||||
|
@ -171,6 +175,7 @@ func TestLoadCrowdsec(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expectedResult: &CrowdsecServiceCfg{
|
expectedResult: &CrowdsecServiceCfg{
|
||||||
|
ConsoleContextPath: "",
|
||||||
AcquisitionFilePath: "./tests/acquis_not_exist.yaml",
|
AcquisitionFilePath: "./tests/acquis_not_exist.yaml",
|
||||||
BucketsRoutinesCount: 0,
|
BucketsRoutinesCount: 0,
|
||||||
ParserRoutinesCount: 0,
|
ParserRoutinesCount: 0,
|
||||||
|
|
Loading…
Reference in a new issue