Repository navigation
Commit 26bad52
authored
test(vanir): capture expected error logs in
`test_process_batch_failure` tests GCS upload error handling by
simulating an exception, however `vanir_signatures.process_batch` calls
`logging.exception()` and an expected traceback was sent to `stderr` in
CI and appearing as a test failure.
- Wrap `process_batch()` in `self.assertLogs(level='ERROR')` to capture
the log output.
- Assert that `Failed upload for VULN-1` is recorded.
- Suppress misleading error tracebacks.test_process_batch_failure (#5849)1 parent 9be83fe commit 26bad52
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
0 commit comments