Skip to content

Commit

Permalink
tests: add context to failures
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <adeza@anchore.com>
  • Loading branch information
Alfredo Deza committed Mar 4, 2021
1 parent af3bece commit 7dad812
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/functional/test_images.py
Expand Up @@ -14,7 +14,8 @@ class TestSmoke:
# basic validation
def test_zero_exit_status(self, image_output):
lines = image_output.split()
assert lines[-1] == '0'
fail_context = '\n'.join(image_output.split('\n')[-20:])
assert lines[-1] == '0', fail_context

def test_found_vulnerabilities(self, image_output):
assert "Failed minimum severity level. Found vulnerabilities with level medium or higher" in image_output

0 comments on commit 7dad812

Please sign in to comment.