From b0c6cfc2155effa4c763614cbe396acd4ea36851 Mon Sep 17 00:00:00 2001 From: Oliver Kurth Date: Tue, 3 May 2022 00:06:11 +0000 Subject: [PATCH] add valgrind tests for install and erase --- pytests/tests/test_erase.py | 8 ++++++++ pytests/tests/test_install.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/pytests/tests/test_erase.py b/pytests/tests/test_erase.py index 26872d42..8d69bc07 100644 --- a/pytests/tests/test_erase.py +++ b/pytests/tests/test_erase.py @@ -44,3 +44,11 @@ def test_erase_package_without_version_suffix(utils): utils.run(['tdnf', 'erase', '-y', pkgname]) assert(not utils.check_package(pkgname)) + + +def test_erase_memcheck(utils): + pkgname = utils.config["mulversion_pkgname"] + utils.install_package(pkgname) + + utils.run_memcheck(['tdnf', 'erase', '-y', pkgname]) + assert(not utils.check_package(pkgname)) diff --git a/pytests/tests/test_install.py b/pytests/tests/test_install.py index 35fc1287..72753eae 100644 --- a/pytests/tests/test_install.py +++ b/pytests/tests/test_install.py @@ -59,3 +59,11 @@ def test_dummy_requires(utils): pkg = utils.config["dummy_requires_pkgname"] ret = utils.run(['tdnf', 'install', '-y', pkg]) assert ' nothing provides ' in ret['stderr'][0] + + +def test_install_memcheck(utils): + pkgname = utils.config["mulversion_pkgname"] + utils.erase_package(pkgname) + + utils.run_memcheck(['tdnf', 'install', '-y', '--nogpgcheck', pkgname]) + assert(utils.check_package(pkgname))