diff options
| -rw-r--r-- | lib/oeqa/runtime/cases/clamav.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lib/oeqa/runtime/cases/clamav.py b/lib/oeqa/runtime/cases/clamav.py index cf83937..e0cad8f 100644 --- a/lib/oeqa/runtime/cases/clamav.py +++ b/lib/oeqa/runtime/cases/clamav.py | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Copyright (C) 2019 Armin Kuster <akuster808@gmail.com> | 1 | # Copyright (C) 2019 - 2022 Armin Kuster <akuster808@gmail.com> |
| 2 | # | 2 | # |
| 3 | import re | 3 | import re |
| 4 | from tempfile import mkstemp | 4 | from tempfile import mkstemp |
| @@ -48,21 +48,8 @@ class ClamavTest(OERuntimeTestCase): | |||
| 48 | self.assertEqual(status, 0, msg = msg) | 48 | self.assertEqual(status, 0, msg = msg) |
| 49 | 49 | ||
| 50 | @OETestDepends(['clamav.ClamavTest.test_ping_clamav_net']) | 50 | @OETestDepends(['clamav.ClamavTest.test_ping_clamav_net']) |
| 51 | def test_freshclam_check_mirrors(self): | ||
| 52 | status, output = self.target.run('freshclam --list-mirrors') | ||
| 53 | match = re.search('Failures: 0', output) | ||
| 54 | if not match: | ||
| 55 | msg = ('freshclam --list-mirrors: failed. ' | ||
| 56 | 'Status and output:%s and %s' % (status, output)) | ||
| 57 | self.assertEqual(status, 1, msg = msg) | ||
| 58 | |||
| 59 | @OETestDepends(['clamav.ClamavTest.test_freshclam_check_mirrors']) | ||
| 60 | def test_freshclam_download(self): | 51 | def test_freshclam_download(self): |
| 61 | status, output = self.target.run('freshclam --show-progress') | 52 | status, output = self.target.run('freshclam --show-progress') |
| 62 | match = re.search('Database updated', output) | 53 | msg = ('freshclam : DB dowbload failed. ' |
| 63 | #match = re.search('main.cvd is up to date', output) | 54 | 'Status and output:%s and %s' % (status, output)) |
| 64 | if not match: | 55 | self.assertEqual(status, 0, msg = msg) |
| 65 | msg = ('freshclam : DB dowbload failed. ' | ||
| 66 | 'Status and output:%s and %s' % (status, output)) | ||
| 67 | self.assertEqual(status, 1, msg = msg) | ||
| 68 | |||
