freezer.tests.unit.test_job module

Freezer main.py related tests

class freezer.tests.unit.test_job.TestAdminJob(*args: object, **kwargs: object)

Bases: TestJob

setUp()

Hook method for setting up the test fixture before exercising it.

test_execute()
test_execute_cindernative_with_date_removal()
test_execute_cindernative_with_fullbackup_rotation()
test_valid_input_reaches_client_creation()
test_validate_bool_remove_older_than()
test_validate_cindernative_boolean_rotation()
test_validate_cindernative_date_with_rotation_defaults_to_date()
test_validate_cindernative_invalid_rotation()
test_validate_cindernative_missing_vol_id()
test_validate_cindernative_negative_rotation()
test_validate_cindernative_with_fullbackup_rotation()
test_validate_cindernative_with_remove_before_date()
test_validate_cindernative_with_remove_older_than()
test_validate_conflicting_dates()
test_validate_date_and_days_conflict()
test_validate_empty_date_with_days_conflict()
test_validate_from_date_and_days_conflict()
test_validate_invalid_remove_before_date()
test_validate_invalid_remove_from_date()
test_validate_invalid_remove_older_than()
test_validate_no_removal_option()
test_validate_remove_older_than_inf()
test_validate_remove_older_than_nan()
test_validate_remove_older_than_negative()
test_validate_remove_older_than_overflow()
test_validate_remove_timestamp_stored()
test_validate_zero_days_accepted()
test_validation_runs_before_client_creation()
class freezer.tests.unit.test_job.TestBackupJob(*args: object, **kwargs: object)

Bases: TestJob

setUp()

Hook method for setting up the test fixture before exercising it.

test_execute_backup_fs_no_incremental_and_backup_level_raise()
test_execute_cinder_metadata_includes_vol_id()

Backup metadata for cinder mode must record cinder_vol_id so the backup record is self-describing and can be located for restore.

test_execute_cindernative(mock_backup_os)
test_execute_cindernative_custom_backup_name_template(mock_backup_os)
test_execute_cindernative_default_backup_name(mock_backup_os)
test_execute_cindernative_invalid_container()
test_execute_cindernative_with_container_template(mock_backup_os)
test_execute_cindernative_without_az(mock_backup_os)
test_execute_fs_metadata_no_extra_cinder_ids()
test_execute_glance_metadata_includes_image_id()

Backup metadata for glance mode must record glance_image_id so the backup record is self-describing and can be located for restore.

test_execute_nova_metadata_includes_resource_ids()

Backup metadata for nova mode must record nova_inst_id and engine_name so the backup record is self-describing and can be located for restore via the API without walking Swift paths.

class freezer.tests.unit.test_job.TestExecJob(*args: object, **kwargs: object)

Bases: TestJob

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_execute_nothing_to_do()
test_execute_raise()
test_execute_script()
class freezer.tests.unit.test_job.TestInfoJob(*args: object, **kwargs: object)

Bases: TestJob

test_execute_list_containers()
test_execute_nothing_to_do()
class freezer.tests.unit.test_job.TestJob(*args: object, **kwargs: object)

Bases: FreezerBaseTestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_execute()
class freezer.tests.unit.test_job.TestRestoreJob(*args: object, **kwargs: object)

Bases: TestJob

setUp()

Hook method for setting up the test fixture before exercising it.

test_execute_cindernative(mock_restore_os)
test_validate_cindernative_no_container()
test_validate_non_cindernative_requires_container()