pulp_smash.tests.pulp3.pulpcore.api_v3.test_crd_artifacts

Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp3.pulpcore.api_v3.test_crd_artifacts

Tests that perform actions over artifacts.

class pulp_smash.tests.pulp3.pulpcore.api_v3.test_crd_artifacts.ArtifactTestCase(methodName='runTest')

Create an artifact by uploading a file.

This test targets the following issues:

classmethod setUpClass()

Delete orphans and create class-wide variables.

test_upload_invalid_attrs()

Upload a file, and provide invalid attributes.

For each possible combination of sha256 and size (except for neither), do the following:

  1. Upload a file with the chosen combination of attributes. Verify that an error is returned.
  2. Verify that no artifacts exist in Pulp whose attributes match the file that was unsuccessfully uploaded.
test_upload_mixed_attrs()

Upload a file, and provide both valid and invalid attributes.

Do the following:

  1. Upload a file and provide both an sha256 and a size. Let one be valid, and the other be valid. Verify that an error is returned.
  2. Verify that no artifacts exist in Pulp whose attributes match the file that was unsuccessfully uploaded.
test_upload_valid_attrs()

Upload a file, and provide valid attributes.

For each possible combination of sha256 and size (including neither), do the following:

  1. Upload a file with the chosen combination of attributes.
  2. Verify that an artifact has been created, and that it has valid attributes.
  3. Delete the artifact, and verify that its attributes are inaccessible.
class pulp_smash.tests.pulp3.pulpcore.api_v3.test_crd_artifacts.ArtifactsDeleteFileSystemTestCase(methodName='runTest')

Delete an artifact, it is removed from the filesystem.

This test targets the following issues:

test_all()

Delete an artifact, it is removed from the filesystem.

Do the following:

  1. Create an artifact, and verify it is present on the filesystem.
  2. Delete the artifact, and verify it is absent on the filesystem.