pulp_2_tests.tests.docker.cli.test_crud¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.docker.cli.test_crud
CRUD tests for docker repositories.
These tests can also be accomplished via the API. However, there is value in showing that the pulp-admin CLI client correctly interfaces with the API.
-
class
pulp_2_tests.tests.docker.cli.test_crud.
CreateTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Create docker repositories, both successfully and unsuccessfully.
-
setUp
()¶ Provide a server config and a repository ID.
-
tearDown
()¶ Delete created resources.
-
test_basic
()¶ Create a docker repository. Only provide a repository ID.
Assert the return code is 0.
-
test_duplicate_ids
()¶ Create two docker repositories with identical IDs.
Assert only the first repository is created.
-
test_with_feed_upstream_name
()¶ Create a docker repository. Provide a feed and upstream name.
Assert the return code is 0.
-
-
class
pulp_2_tests.tests.docker.cli.test_crud.
DeleteV2TestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Delete a populated v2 repository.
There was a bug in the Docker server plugin that caused a traceback when repos were deleted. This test ensures that that operation works correctly.
https://pulp.plan.io/issues/1296
-
classmethod
setUpClass
()¶ Provide a server config and a repository ID.
-
test_data_gone
()¶ Assert that the published data was cleaned up.
-
test_repo_gone
()¶ Assert that the repo is not in the pulp-admin output anymore.
-
test_success
()¶ Assert that the CLI reported success.
-
classmethod
-
class
pulp_2_tests.tests.docker.cli.test_crud.
UpdateDistributorTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Update a docker repository and use the
--repo-registry-id
flag.This test case targets Pulp issue 1710. According to this bug, updating and using the
--repo-registry-id
flag would trigger a traceback.-
classmethod
setUpClass
()¶ Provide a server config and a repository ID.
-
classmethod
tearDownClass
()¶ Delete created resources.
-
test_repo_registry_id_flag
()¶ Verify the information sent to the server can be read back.
-
test_stdout
()¶ Inspect the stdout emitted by
pulp-admin
when updating.
-
classmethod
-
class
pulp_2_tests.tests.docker.cli.test_crud.
UpdateEnableV1TestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Update a docker repository’s –enable-v1 flag.
There was a bug in pulp-admin wherein the –enable-v1 flag could be set during repository creation, but not while updating repositories. This test ensures that behavior functions correctly.
-
classmethod
setUpClass
()¶ Provide a server config and a repository ID.
-
classmethod
tearDownClass
()¶ Delete created resources.
-
test_change_enable_v1_flag
()¶ Test that the –enable-v1 flag was successful.
-
test_success
()¶ Assert that the CLI reported success.
-
classmethod
-
class
pulp_2_tests.tests.docker.cli.test_crud.
UpdateEnableV2TestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Update a docker repository’s –enable-v2 flag.
There was a bug in pulp-admin wherein the –enable-v2 flag could be set during repository creation, but not while updating repositories. This test ensures that behavior functions correctly.
-
classmethod
setUpClass
()¶ Provide a server config and a repository ID.
-
classmethod
tearDownClass
()¶ Delete created resources.
-
test_change_enable_v2_flag
()¶ Test that the –enable-v2 flag was successful.
-
test_success
()¶ Assert that the CLI reported success.
-
classmethod