pulp_2_tests.tests.platform.cli.test_pulp_manage_db

Location: Pulp 2 TestsTestspulp_2_tests.tests.platform.cli.test_pulp_manage_db

Tests for the pulp-manage-db executable.

pulp-manage-db should only run when REQUIRED_SERVICES are running and when CONFLICTING_SERVICES are stopped. See:

class pulp_2_tests.tests.platform.cli.test_pulp_manage_db.BaseTestCase(methodName='runTest')

Bases: unittest.case.TestCase

An abstract base class for the test cases in this module.

classmethod setUpClass()

Maybe skip this test case.

tearDown()

Start all of Pulp’s services.

pulp_2_tests.tests.platform.cli.test_pulp_manage_db.CONFLICTING_SERVICES = frozenset({'pulp_celerybeat', 'pulp_resource_manager', 'pulp_workers'})

If any of these services are running, pulp-manage-db will abort.

class pulp_2_tests.tests.platform.cli.test_pulp_manage_db.NegativeTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.platform.cli.test_pulp_manage_db.BaseTestCase

Assert pulp-manage-db doesn’t run when inappropriate.

test_celerybeat_running()

Test with pulp_celerybeat running.

test_conflicting_running()

Test with CONFLICTING_SERVICES running.

test_required_stopped()

Test with REQUIRED_SERVICES stopped.

test_resource_manager_running()

Test with pulp_resource_manager running.

This test targets Pulp #2684.

test_workers_running()

Test with pulp_workers running.

This test targets Pulp #2684.

class pulp_2_tests.tests.platform.cli.test_pulp_manage_db.PositiveTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.platform.cli.test_pulp_manage_db.BaseTestCase

Assert pulp-manage-db runs when appropriate.

test_conflicting_stopped()

Test with CONFLICTING_SERVICES stopped.

test_dry_run()

Make sure pulp-manage-db runs if –dry-run is passed.

pulp_2_tests.tests.platform.cli.test_pulp_manage_db.REQUIRED_SERVICES = frozenset({'mongod'})

If any of these services are stopped, pulp-manage-db will abort.

pulp_2_tests.tests.platform.cli.test_pulp_manage_db.setUpModule()

Log in.

pulp_2_tests.tests.platform.cli.test_pulp_manage_db.tearDownModule()

Reset Pulp, in case one of the test cases breaks Pulp.