@@ -166,18 +166,16 @@ get_latest_version() {
166166
167167 rune -0 cscli parsers install crowdsecurity/whitelists --dry-run
168168 assert_output - --stderr << -EOT
169- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
170169 Nothing to do.
171170 EOT
172- refute_stderr
171+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite "
173172
174173 # XXX should this fail with status 1 instead?
175174 rune -0 cscli parsers install crowdsecurity/whitelists
176175 assert_output - << -EOT
177- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
178176 Nothing to do.
179177 EOT
180- refute_stderr
178+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite "
181179
182180 rune -0 cscli parsers install crowdsecurity/whitelists --force
183181 latest_whitelists=$( get_latest_version parsers crowdsecurity/whitelists)
@@ -230,17 +228,14 @@ get_latest_version() {
230228 # and maybe re-evaluate the --ignore flag
231229 rune -0 cscli parsers install crowdsecurity/whitelists --ignore
232230 assert_output - << -EOT
233- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
234231 Nothing to do.
235232 EOT
236- refute_stderr
233+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite "
237234
238235 # error on one item, should still install the others
239236 rune -0 cscli parsers install crowdsecurity/whitelists crowdsecurity/pgsql-logs --ignore
240- refute_stderr
241237 latest_pgsql=$( get_latest_version parsers crowdsecurity/pgsql-logs)
242238 assert_output - << -EOT
243- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
244239 Action plan:
245240 📥 download
246241 parsers: crowdsecurity/pgsql-logs ($latest_pgsql )
@@ -252,6 +247,7 @@ get_latest_version() {
252247
253248 $RELOAD_MESSAGE
254249 EOT
250+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite"
255251 rune -0 cscli parsers inspect crowdsecurity/pgsql-logs --no-metrics -o json
256252 rune -0 jq -e ' .installed==true' <( output)
257253}
@@ -268,14 +264,14 @@ get_latest_version() {
268264
269265 # attempt to install from hub
270266 rune -0 cscli parsers install crowdsecurity/sshd-logs
271- assert_line ' parsers:crowdsecurity/sshd-logs - not downloading local item'
267+ assert_stderr --partial ' parsers:crowdsecurity/sshd-logs - not downloading local item'
272268 rune -0 cscli parsers list -o json
273269 rune -0 jq -c ' .parsers[] | [.name,.status]' <( output)
274270 assert_json ' ["crowdsecurity/sshd-logs","enabled,local"]'
275271
276272 # attempt to install from a collection
277273 rune -0 cscli collections install crowdsecurity/sshd
278- assert_line ' parsers:crowdsecurity/sshd-logs - not downloading local item'
274+ assert_stderr --partial ' parsers:crowdsecurity/sshd-logs - not downloading local item'
279275
280276 # verify it installed the rest of the collection
281277 assert_line ' enabling contexts:crowdsecurity/bf_base'
@@ -293,11 +289,11 @@ get_latest_version() {
293289
294290 # attempt to install from hub
295291 rune -0 cscli parsers install crowdsecurity/sshd-logs
296- assert_line ' parsers:crowdsecurity/sshd-logs - not downloading local item'
292+ assert_stderr --partial ' parsers:crowdsecurity/sshd-logs - not downloading local item'
297293
298294 # attempt to install from a collection
299295 rune -0 cscli collections install crowdsecurity/sshd
300- assert_line ' parsers:crowdsecurity/sshd-logs - not downloading local item'
296+ assert_stderr --partial ' parsers:crowdsecurity/sshd-logs - not downloading local item'
301297
302298 # verify it installed the rest of the collection
303299 assert_line ' enabling contexts:crowdsecurity/bf_base'
0 commit comments