pulp_2_tests.tests.docker.api_v2.test_remove

Location: Pulp 2 TestsTestspulp_2_tests.tests.docker.api_v2.test_remove

Tests for recursively removing docker units sequentially and in batch.

class pulp_2_tests.tests.docker.api_v2.test_remove.RemoveV2ContentTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Ensure content removal of Docker repository information.

With the refactor of the docker importer’s remove function to increase performance, content removal needs to be functional verified.

The cases covered with content count verification for all units:

  1. Remove all manifest_lists sequentially.
  2. Remove all manifests sequentially.
  3. Remove all blobs sequentially.
  4. Remove all manifest_lists batch.
  5. Remove all manifests batch.
  6. Remove all blobs batch.
  7. Remove some non-shared manifest lists.
  8. Remove some non-shared manifest.
  9. Remove some shared manifests lists and verify shared units are not recursively removed.
  10. Remove some shared manifests and verify shared units are not recursively removed.

The fixture includes:

  • 2 relatively independent manifest lists (no shared manifests, no shared blobs between them)
  • 2 manifest lists that share some (but not all) manifests, and those manifest share some (but not all) blobs. This only requires the creation of 1 manifest list that shares some content with one of the first “independent manifest lists”.
  • 2 relatively independent manifests
  • 2 manifests that share (some but not all) blobs

In order to sync the content, each content unit must be recursively related to at least 1 tag.

ML = Manifest List M = Manifest B = Blob

Fixture:

  • ML_I
    • M_A
      • B_1
      • B_2
    • M_B
      • B_3
      • B_4
  • ML_II
    • M_C
      • B_5
      • B_6
    • M_D
      • B_7
      • B_8
  • ML_III
    • M_A
      • B_1
      • B_2
    • M_C
      • B_5
      • B_6
  • M_E
    • B_1
    • B_9

Tags: 1 for each “top level” (ML_I, ML_II, ML_III, M_E)

This test case targets:

copy_docker_units(repo, source_repo, units)

Copy specified docker units from source to dest.

count_docker_units(repo, state)

Count and verify the number of docker_units based on reference.

create_and_copy_test_repo(source_repo, copy_units)

Return test repo to copy units to test.

delete_docker_units(repo, units)

Batch delete docker units.

delete_docker_units_sequential(repo, units)

Sequentially delete docker units.

get_docker_units_count(repo, unit_type)

Return docker units filtered by type.

search_docker_units(repo, unit_type)

Return docker units filtered by type.

classmethod setUpClass()

Set cfg and api for each test.

classmethod tearDownClass()

Clean resources.

test_01_remove_manifest_list_all_sequential()

Sync docker repo and remove all manifest_lists sequentially.

test_02_remove_manifest_all_sequential()

Sync docker repo and remove all manifests sequentially.

test_03_remove_blob_all_sequential()

Sync docker repo and remove all blobs sequentially.

test_04_remove_manifest_list_all_batch()

Sync docker repo and remove all manifest_lists in batch.

test_05_remove_manifest_all_batch()

Sync docker repo and remove all manifests in batch.

test_06_remove_blob_all_batch()

Sync docker repo and remove all blobs in batch.

test_07_remove_manifest_list_not_shared()

Sync docker repo and remove some non-shared manifest_lists.

test_08_remove_manifest_list_shared()

Sync docker repo and remove some shared manifest_lists.

test_09_remove_manifest_not_shared()

Sync docker repo and remove some non-shared manifests.

test_10_remove_manifest_shared()

Sync docker repo and remove some shared manifests.