@@ -166,18 +166,16 @@ get_latest_version() {
166
166
167
167
rune -0 cscli parsers install crowdsecurity/whitelists --dry-run
168
168
assert_output - --stderr << -EOT
169
- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
170
169
Nothing to do.
171
170
EOT
172
- refute_stderr
171
+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite "
173
172
174
173
# XXX should this fail with status 1 instead?
175
174
rune -0 cscli parsers install crowdsecurity/whitelists
176
175
assert_output - << -EOT
177
- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
178
176
Nothing to do.
179
177
EOT
180
- refute_stderr
178
+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite "
181
179
182
180
rune -0 cscli parsers install crowdsecurity/whitelists --force
183
181
latest_whitelists=$( get_latest_version parsers crowdsecurity/whitelists)
@@ -230,17 +228,14 @@ get_latest_version() {
230
228
# and maybe re-evaluate the --ignore flag
231
229
rune -0 cscli parsers install crowdsecurity/whitelists --ignore
232
230
assert_output - << -EOT
233
- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
234
231
Nothing to do.
235
232
EOT
236
- refute_stderr
233
+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite "
237
234
238
235
# error on one item, should still install the others
239
236
rune -0 cscli parsers install crowdsecurity/whitelists crowdsecurity/pgsql-logs --ignore
240
- refute_stderr
241
237
latest_pgsql=$( get_latest_version parsers crowdsecurity/pgsql-logs)
242
238
assert_output - << -EOT
243
- WARN parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite
244
239
Action plan:
245
240
📥 download
246
241
parsers: crowdsecurity/pgsql-logs ($latest_pgsql )
@@ -252,6 +247,7 @@ get_latest_version() {
252
247
253
248
$RELOAD_MESSAGE
254
249
EOT
250
+ assert_stderr --partial " parsers:crowdsecurity/whitelists is tainted, use '--force' to overwrite"
255
251
rune -0 cscli parsers inspect crowdsecurity/pgsql-logs --no-metrics -o json
256
252
rune -0 jq -e ' .installed==true' <( output)
257
253
}
@@ -268,14 +264,14 @@ get_latest_version() {
268
264
269
265
# attempt to install from hub
270
266
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'
272
268
rune -0 cscli parsers list -o json
273
269
rune -0 jq -c ' .parsers[] | [.name,.status]' <( output)
274
270
assert_json ' ["crowdsecurity/sshd-logs","enabled,local"]'
275
271
276
272
# attempt to install from a collection
277
273
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'
279
275
280
276
# verify it installed the rest of the collection
281
277
assert_line ' enabling contexts:crowdsecurity/bf_base'
@@ -293,11 +289,11 @@ get_latest_version() {
293
289
294
290
# attempt to install from hub
295
291
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'
297
293
298
294
# attempt to install from a collection
299
295
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'
301
297
302
298
# verify it installed the rest of the collection
303
299
assert_line ' enabling contexts:crowdsecurity/bf_base'
0 commit comments