mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
cscli/hub: don't return error if some file can't be recognized (#3150)
In k8s there can be extra directories while mounting config maps, which leads to a failure while parsing the hub state. The PR changes these kind of errors to warnings.
This commit is contained in:
parent
36d15fedce
commit
20067a85a0
2 changed files with 11 additions and 2 deletions
|
@ -193,3 +193,10 @@ teardown() {
|
|||
rune -0 jq -c '.tainted' <(output)
|
||||
assert_output 'false'
|
||||
}
|
||||
|
||||
@test "skip files if we can't guess their type" {
|
||||
rune -0 mkdir -p "$CONFIG_DIR/scenarios/foo"
|
||||
rune -0 touch "$CONFIG_DIR/scenarios/foo/bar.yaml"
|
||||
rune -0 cscli hub list
|
||||
assert_stderr --partial "Ignoring file $CONFIG_DIR/scenarios/foo/bar.yaml: unknown configuration type"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue