Skip to content

Commit

Permalink
Fix tests with new rpm2cpio command
Browse files Browse the repository at this point in the history
  • Loading branch information
danigm committed Sep 18, 2024
1 parent d07999c commit 054c46c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Empty file.
4 changes: 4 additions & 0 deletions test/test_file_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ def test_default_digester():


@pytest.mark.parametrize('package', ['binary/pam-module'])
@pytest.mark.skipif(os.getuid() != 0, reason='Root can extract this package, so nothing to check')
def test_pam_modules(tmp_path, package, digestcheck):
output, test = get_digestcheck('digests_pam.config')
test.check(get_tested_package(package, tmp_path))
Expand All @@ -395,6 +396,7 @@ def test_pam_modules(tmp_path, package, digestcheck):


@pytest.mark.parametrize('package', ['binary/pam-module'])
@pytest.mark.skipif(os.getuid() != 0, reason='Root can extract this package, so nothing to check')
def test_pam_includeonly_nonexistent(tmp_path, package, digestcheck):
output, test = get_digestcheck('digests_pam1.config')
test.check(get_tested_package(package, tmp_path))
Expand All @@ -403,6 +405,7 @@ def test_pam_includeonly_nonexistent(tmp_path, package, digestcheck):


@pytest.mark.parametrize('package', ['binary/pam-module'])
@pytest.mark.skipif(os.getuid() != 0, reason='Root can extract this package, so nothing to check')
def test_pam_includeonly_existent(tmp_path, package, digestcheck):
output, test = get_digestcheck('digests_pam2.config')
test.check(get_tested_package(package, tmp_path))
Expand All @@ -411,6 +414,7 @@ def test_pam_includeonly_existent(tmp_path, package, digestcheck):


@pytest.mark.parametrize('package', ['binary/pam-module'])
@pytest.mark.skipif(os.getuid() != 0, reason='Root can extract this package, so nothing to check')
def test_pam(tmp_path, package, digestcheck):
output, test = get_digestcheck('digests_pam3.config')
test.check(get_tested_package(package, tmp_path))
Expand Down
1 change: 1 addition & 0 deletions test/test_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ def test_header_information(capsys):
def test_run_full_rpm(capsys, packages, configs):
# the package cannot be extracted using rpm2cpio because it contains a directory without 'x' permission
packages.remove(Path('test/binary/python311-pytest-xprocess-0.23.0-2.4.noarch.rpm'))
packages.remove(Path('test/binary/pam-module-1.0-0.x86_64.rpm'))

number_of_pkgs = len(packages)
additional_options = {
Expand Down

0 comments on commit 054c46c

Please sign in to comment.