functional tests, minor refactoring and lint/cleanup (#1570)

* cmd/crowdsec: removed log.Fatal()s, added tests and print error for unrecognized argument
* updated golangci-lint to v1.46
* lint/deadcode: fix existing issues
* tests: cscli config backup/restore
* tests: cscli completion powershell/fish
* err check: pflags MarkHidden()
* empty .dockerignore (and explain the reason)
* tests, errors.Wrap
* test for CS_LAPI_SECRET and minor refactoring
* minor style changes
* log cleanup
This commit is contained in:
mmetc 2022-06-06 15:24:48 +02:00 committed by GitHub
parent df7c51f34e
commit 799cc82bb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 388 additions and 278 deletions

View file

@ -295,7 +295,7 @@ func testSubSet(testSet TestFile, pctx UnixParserCtx, nodes []Node) (bool, error
only the keys of the expected part are checked against result
*/
if len(testSet.Results) == 0 && len(results) == 0 {
log.Fatalf("No results, no tests, abort.")
log.Fatal("No results, no tests, abort.")
return false, fmt.Errorf("no tests, no results")
}