Orchestrata Ultimate › Tests › Reference › orchestrator › test_policy_registry_extended

Tests reference — tests/orchestrator/test_policy_registry_extended.py

Module of tests/orchestrator, split out because the directory page would be too large.

Prose pending.

tests/orchestrator/test_policy_registry_extended.py

source · 39 tests · 524 lines

Covers: orchestrator.policy_registry

Kind Name Line Description
function test_policy_with_metadata 76
function test_policy_with_description 82
function test_policy_deprecated_status 87
function test_policy_custom_version 92
function test_policy_version_with_updated_by 102
function test_policy_version_defaults 112
function test_registry_register_duplicate_returns_false 124
function test_registry_get_nonexistent_returns_none 131
function test_registry_get_by_type_all_types 136
function test_registry_get_by_type_empty_registry 147
function test_registry_get_by_type_no_matches 152
function test_registry_update_multiple_versions 163
function test_registry_update_nonexistent_policy 172
function test_registry_rollback_to_first_version 177
function test_registry_rollback_updates_history 188
function test_registry_watcher_exception_ignored 204 Watchers that raise should not break registry operations.
function test_registry_watcher_exception_with_lambda 216 Watcher lambda that raises should be caught and logged.
function test_registry_save_to_disk_oserror 224 save_to_disk should return False when writing fails.
function test_registry_save_to_disk_no_storage_dir 235
function test_registry_default_values_on_loaded_policy 245 Default metadata and description should be empty dict/string.
function test_registry_load_missing_history_file 261 Loading should work when only policies.json exists (no history).
function test_registry_load_malformed_history_json 282
function test_registry_load_invalid_policy_type 296
function test_registry_load_invalid_policy_status 317
function test_registry_load_missing_policy_id 337
function test_registry_storage_dir_created_from_string 358
function test_registry_roundtrip_all_statuses_and_types 365
function test_registry_watcher_receives_correct_args 397
function test_registry_export_all_converts_enums 417
function test_registry_export_all_empty 435
function test_registry_export_all_preserves_metadata 440
function test_registry_activate_already_active 452
function test_registry_deactivate_already_inactive 459
function test_registry_deactivate_updates_timestamp 466
function test_registry_activate_updates_timestamp 475
function test_registry_history_for_nonexistent_policy 489
function test_registry_history_ordering 494
function test_registry_rollback_policy_not_in_policies 513
function test_registry_rollback_policy_not_in_history 519