pulp_smash.tests.pulp3.file.api_v3.test_sync

Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp3.file.api_v3.test_sync

Tests that sync file plugin repositories.

class pulp_smash.tests.pulp3.file.api_v3.test_sync.MultiResourceLockingTestCase(methodName='runTest')

Verify multi-resourcing locking.

This test targets the following issues:

test_all()

Verify multi-resourcing locking.

Do the following:

  1. Create a repository, and a remote.
  2. Update the remote to point to a different url.
  3. Immediately run a sync. The sync should fire after the update and sync from the second url.
  4. Assert that remote url was updated.
  5. Assert that the number of units present in the repository is according to the updated url.
class pulp_smash.tests.pulp3.file.api_v3.test_sync.SyncChangeRepoVersionTestCase(methodName='runTest')

Verify whether sync of repository updates repository version.

test_all()

Verify whether the sync of a repository updates its version.

This test explores the design choice stated in the Pulp #3308 that a new repository version is created even if the sync does not add or remove any content units. Even without any changes to the remote if a new sync occurs, a new repository version is created.

Do the following:

  1. Create a repository, and an remote.
  2. Sync the repository an arbitrary number of times.
  3. Verify that the repository version is equal to the previous number of syncs.
class pulp_smash.tests.pulp3.file.api_v3.test_sync.SyncFileRepoTestCase(methodName='runTest')

Sync repositories with the file plugin.

do_test(download_policy, sync_mode)

Sync repositories with the file plugin.

In order to sync a repository an remote has to be associated within this repository. When a repository is created this version field is set as None. After a sync the repository version is updated.

Do the following:

  1. Create a repository, and an remote.
  2. Assert that repository version is None.
  3. Sync the remote.
  4. Assert that repository version is not None.
  5. Sync the remote one more time.
  6. Assert that repository version is different from the previous one.
Parameters:
  • download_policy – The download policy for the remote.
  • sync_mode – The sync mode for the remote.
classmethod setUpClass()

Create class-wide variables.

test_all()

Call do_test() with varying arguments.

Call do_test() with each possible pairing of pulp_smash.tests.pulp3.constants.REMOTE_DOWN_POLICY and pulp_smash.tests.pulp3.constants.REMOTE_SYNC_MODE. If Pulp #3320 affects Pulp, then the background and on_demand download policies are omitted from the test matrix.