oeqa/clamav drop depricated --list-mirror test

Fix download test

Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Armin Kuster
2022-06-19 08:37:52 -07:00
parent 123c59c313
commit fccbe155be
+4 -17
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2019 Armin Kuster <akuster808@gmail.com> # Copyright (C) 2019 - 2022 Armin Kuster <akuster808@gmail.com>
# #
import re import re
from tempfile import mkstemp from tempfile import mkstemp
@@ -48,21 +48,8 @@ class ClamavTest(OERuntimeTestCase):
self.assertEqual(status, 0, msg = msg) self.assertEqual(status, 0, msg = msg)
@OETestDepends(['clamav.ClamavTest.test_ping_clamav_net']) @OETestDepends(['clamav.ClamavTest.test_ping_clamav_net'])
def test_freshclam_check_mirrors(self):
status, output = self.target.run('freshclam --list-mirrors')
match = re.search('Failures: 0', output)
if not match:
msg = ('freshclam --list-mirrors: failed. '
'Status and output:%s and %s' % (status, output))
self.assertEqual(status, 1, msg = msg)
@OETestDepends(['clamav.ClamavTest.test_freshclam_check_mirrors'])
def test_freshclam_download(self): def test_freshclam_download(self):
status, output = self.target.run('freshclam --show-progress') status, output = self.target.run('freshclam --show-progress')
match = re.search('Database updated', output) msg = ('freshclam : DB dowbload failed. '
#match = re.search('main.cvd is up to date', output) 'Status and output:%s and %s' % (status, output))
if not match: self.assertEqual(status, 0, msg = msg)
msg = ('freshclam : DB dowbload failed. '
'Status and output:%s and %s' % (status, output))
self.assertEqual(status, 1, msg = msg)