tests: Replace wc -l with grep -c (#3752)

This commit is contained in:
Casper 2024-01-06 17:07:00 +01:00 committed by GitHub
parent 6082d5f8d0
commit 0eb4ac7714
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 12 deletions

View file

@ -33,7 +33,7 @@ function setup_file() {
function teardown_file() { _default_teardown ; }
@test 'log files exist at /var/log/mail directory' {
_run_in_container_bash "ls -1 /var/log/mail/ | grep -E 'clamav|freshclam|mail.log' | wc -l"
_run_in_container_bash "ls -1 /var/log/mail/ | grep -c -E 'clamav|freshclam|mail.log'"
assert_success
assert_output 3
}