error reporting (#1501)

* unified error reporting, removed redundancy, tests
This commit is contained in:
mmetc 2022-05-19 10:48:08 +02:00 committed by GitHub
parent bf3ea71630
commit 131ed1b0a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 168 additions and 68 deletions

View file

@ -89,7 +89,7 @@ func TestSimulationLoading(t *testing.T) {
},
Crowdsec: &CrowdsecServiceCfg{},
},
err: fmt.Sprintf("while reading %s: open %s: The system cannot find the file specified.", testXXFullPath, testXXFullPath),
err: fmt.Sprintf("while reading yaml file: open %s: The system cannot find the file specified.", testXXFullPath),
})
} else {
tests = append(tests, struct {
@ -106,7 +106,7 @@ func TestSimulationLoading(t *testing.T) {
},
Crowdsec: &CrowdsecServiceCfg{},
},
err: fmt.Sprintf("while reading %s: open %s: no such file or directory", testXXFullPath, testXXFullPath),
err: fmt.Sprintf("while reading yaml file: open %s: no such file or directory", testXXFullPath),
})
}