Skip to content

Commit

Permalink
Merge pull request #313 from oliverkurth/topic/okurth/test-conflicts
Browse files Browse the repository at this point in the history
improve conflict tests
  • Loading branch information
oliverkurth authored May 6, 2022
2 parents ccf0d72 + 12116bc commit 0bf7031
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytests/tests/test_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
pkg1 = "tdnf-conflict-file1"


@pytest.fixture(scope='module', autouse=True)
@pytest.fixture(scope='function', autouse=True)
def setup_test(utils):
yield
teardown_test(utils)
Expand All @@ -31,9 +31,12 @@ def test_install_conflict_file(utils):
ret = utils.run(['tdnf', 'install', '-y', '--nogpgcheck', pkg1])
print(ret)
assert(ret['retval'] == 1525)
assert(not utils.check_package(pkg1))


def test_install_conflict_file_atonce(utils):
ret = utils.run(['tdnf', 'install', '-y', '--nogpgcheck', pkg0, pkg1])
print(ret)
assert(ret['retval'] == 1525)
assert(not utils.check_package(pkg0))
assert(not utils.check_package(pkg1))
3 changes: 3 additions & 0 deletions pytests/tests/test_skip_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_install_conflict_file(utils):
ret = utils.run(['tdnf', '--repoid={}'.format(REPOID), 'install', '-y', '--nogpgcheck', pkg1])
print(ret)
assert(ret['retval'] == 1525)
assert(not utils.check_package(pkg1))


def test_install_conflict_file_atonce(utils):
Expand All @@ -102,3 +103,5 @@ def test_install_conflict_file_atonce(utils):
ret = utils.run(['tdnf', '--repoid={}'.format(REPOID), 'install', '-y', '--nogpgcheck', pkg0, pkg1])
print(ret)
assert(ret['retval'] == 1525)
assert(not utils.check_package(pkg0))
assert(not utils.check_package(pkg1))

0 comments on commit 0bf7031

Please sign in to comment.