From 71061edbe1718d55af0b5c00cc5acb49374e21b6 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Thu, 16 Jun 2022 09:50:03 -0700 Subject: oeqa: add aide test Signed-off-by: Armin Kuster --- lib/oeqa/runtime/cases/aide.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/oeqa/runtime/cases/aide.py (limited to 'lib/oeqa/runtime') diff --git a/lib/oeqa/runtime/cases/aide.py b/lib/oeqa/runtime/cases/aide.py new file mode 100644 index 0000000..4c7633c --- /dev/null +++ b/lib/oeqa/runtime/cases/aide.py @@ -0,0 +1,26 @@ +# Copyright (C) 2022 Armin Kuster +# +import re + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage + + +class AideTest(OERuntimeTestCase): + + @OEHasPackage(['aide']) + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_aide_help(self): + status, output = self.target.run('aide --help') + msg = ('Aide help command does not work as expected. ' + 'Status and output:%s and %s' % (status, output)) + self.assertEqual(status, 0, msg = msg) + + @OETestDepends(['aide.AideTest.test_aide_help']) + def test_aide_dbinit(self): + status, output = self.target.run('aide --init') + match = re.search('Number of entries:', output) + if not match: + msg = ('Aide db init failed: output is:\n%s' % output) + self.assertEqual(status, 0, msg = msg) -- cgit v1.2.3-54-g00ecf