pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs

Location: Pulp 2 TestsTestspulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs

Tests for repository signature checks when syncing packages.

This module mimics pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_uploads, except that packages are synced in to Pulp instead of being uploaded.

Note

Pulp’s signature checking logic is subtle. Please read pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_uploads.

class pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.AllowAnyKeyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs._BaseTestCase

Use an importer that allows unsigned packages and has no key IDs.

The importer should have the following pseudocode configuration:

{"require_signature": false, "allowed_keys": []}
test_signed_drpm()

Sync signed DRPMs into the repository.

Assert packages are synced in.

test_signed_rpm()

Sync signed RPMs into the repository.

Assert packages are synced in.

test_signed_srpm()

Sync signed SRPMs into the repository.

Assert packages are synced in.

test_unsigned_drpms()

Import unsigned DRPMs into a repository.

Verify packages are synced.

test_unsigned_rpms()

Import unsigned RPMs into a repository.

Verify packages are synced.

test_unsigned_srpms()

Import unsigned SRPMs into a repository.

Verify packages are synced.

class pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.AllowInvalidKeyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs._BaseTestCase

Use an importer that allows unsigned packages and has an invalid key ID.

The importer should have the following pseudocode configuration:

{"require_signature": false, "allowed_keys": ["invalid key id"]}
test_signed_packages()

Import signed RPMs, DRPMs and SRPMs into repositories.

Assert no packages are synced.

test_unsigned_drpms()

Import unsigned DRPMs into a repository.

Assert packages are synced.

test_unsigned_rpms()

Import unsigned RPMs into a repository.

Assert packages are synced.

test_unsigned_srpms()

Import unsigned SRPMs into a repository.

Assert packages are synced.

class pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.AllowValidKeyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs._BaseTestCase

Use an importer that allows unsigned packages and has a valid key ID.

The importer should have the following pseudocode configuration:

{"require_signature": false, "allowed_keys": ["valid key id"]}

Note

Pulp’s signature checking logic is subtle. Please read pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_uploads.

test_signed_drpm()

Sync signed DRPMs into the repository.

Assert packages are synced in.

test_signed_rpm()

Sync signed RPMs into the repository.

Assert packages are synced in.

test_signed_srpm()

Sync signed SRPMs into the repository.

Assert packages are synced in.

test_unsigned_drpms()

Import unsigned DRPMs into a repository.

Assert packages are synced.

test_unsigned_rpms()

Import unsigned RPMs into a repository.

Assert packages are synced.

test_unsigned_srpms()

Import unsigned SRPMs into a repository.

Assert packages are synced.

class pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.RequireAnyKeyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs._BaseTestCase

Use an importer that requires signatures and has no key IDs.

The importer should have the following pseudocode configuration:

{"require_signature": true, "allowed_keys": []}
test_signed_drpm()

Sync signed DRPMs into the repository.

Assert packages are synced in.

test_signed_rpm()

Sync signed RPMs into the repository.

Assert packages are synced in.

test_signed_srpm()

Sync signed SRPMs into the repository.

Assert packages are synced in.

test_unsigned_packages()

Sync unsigned RPMs, DRPMs and SRPMS into repositories.

Assert no packages are synced in.

class pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.RequireInvalidKeyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs._BaseTestCase

Use an importer that requires signatures and has an invalid key ID.

The importer should have the following pseudocode configuration:

{"require_signature": true, "allowed_keys": ["invalid key id"]}
test_packages()

Sync signed and unsigned RPMs, DRPMs and SRPMs into repositories.

Assert no packages are synced in.

class pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.RequireValidKeyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs._BaseTestCase

Use an importer that requires signatures and has a valid key ID.

The importer should have the following pseudocode configuration:

{"require_signature": true, "allowed_keys": ["valid key id"]}
test_signed_drpm()

Sync signed DRPMs into the repository.

Assert packages are synced in.

test_signed_rpm()

Sync signed RPMs into the repository.

Assert packages are synced in.

test_signed_srpm()

Sync signed SRPMs into the repository.

Assert packages are synced in.

test_unsigned_packages()

Sync unsigned RPMs, DRPMs and SRPMS into repositories.

Assert no packages are synced in.

pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.setUpModule()

Conditionally skip tests.

pulp_2_tests.tests.rpm.api_v2.test_signatures_checked_for_syncs.tearDownModule()

Delete orphan content units.