summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2022-06-19 08:37:52 -0700
committerArmin Kuster <akuster808@gmail.com>2022-06-23 18:47:59 -0700
commitfccbe155be6b3a62cc565861114274f3fd72c564 (patch)
tree29564e9f0152acf93c73e77be147ccb95f57336a
parent123c59c313c67431087de08536fc03c639a595f7 (diff)
downloadmeta-security-fccbe155be6b3a62cc565861114274f3fd72c564.tar.gz
oeqa/clamav drop depricated --list-mirror test
Fix download test Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--lib/oeqa/runtime/cases/clamav.py21
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#
3import re 3import re
4from tempfile import mkstemp 4from 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