Commit 210fa2c
syslog: accept standard rsyslogd rate-limit message in test_syslog_rate_limit
The test expected only SONiC's patched rsyslogd message:
'begin to drop messages due to rate-limiting'
Standard rsyslogd (used on some platforms) emits a different message:
'N messages lost due to rate-limiting (M allowed within K seconds)'
Both messages indicate that rate limiting is working correctly. Use
regex alternation to accept either form, making the test work across
different rsyslogd builds.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Bing Wang <bingwang@microsoft.com>1 parent ac0003e commit 210fa2c
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
0 commit comments