Skip to main content

Module trigger

Module trigger 

Source
Expand description

Shared trigger store test definitions.

Each function tests a specific behavior of the TriggerStore trait. Backend crates call these with their concrete implementation.

Functionsยง

test_claim_trigger_run_dedup
Claim trigger run deduplication.
test_cron_execution_history
Cron execution history: get_last_cron_execution returns None initially, then the stored value.
test_cron_execution_optimistic_lock
Cron execution with optimistic locking.
test_cron_sequential_executions
Sequential cron executions with correct optimistic lock chaining.
test_get_all_conditions
get_all_conditions returns every condition type, not just cron.
test_get_conditions_for_task
Query conditions by source task.
test_get_cron_conditions
Query cron conditions.
test_get_event_conditions
Query event conditions by event code.
test_get_triggers_for_condition
Query triggers linked to a condition.
test_multiple_cron_conditions
Multiple cron conditions can coexist and be retrieved.
test_purge_clears_all
Purge clears all trigger data.
test_register_and_get_condition
Register a condition and retrieve it by ID.
test_register_and_get_trigger
Register a trigger definition and retrieve it.
test_remove_triggers_for_task
Remove all triggers for a task.
test_trigger_and_logic
AND trigger logic requires all conditions to be valid.
test_valid_condition_lifecycle
Record, retrieve, and clear valid conditions.