formatting
This commit is contained in:
@@ -43,7 +43,7 @@ async fn test_create_execution_basic() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let execution = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -76,7 +76,7 @@ async fn test_create_execution_without_action() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let execution = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -109,7 +109,7 @@ async fn test_create_execution_with_all_fields() {
|
||||
executor: None, // Don't reference non-existent identity
|
||||
status: ExecutionStatus::Scheduled,
|
||||
result: Some(json!({"status": "ok"})),
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let execution = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -144,7 +144,7 @@ async fn test_create_execution_with_parent() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let parent = ExecutionRepository::create(&pool, parent_input)
|
||||
@@ -162,7 +162,7 @@ async fn test_create_execution_with_parent() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let child = ExecutionRepository::create(&pool, child_input)
|
||||
@@ -200,7 +200,7 @@ async fn test_find_execution_by_id() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -252,7 +252,7 @@ async fn test_list_executions() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -297,7 +297,7 @@ async fn test_list_executions_ordered_by_created_desc() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let exec = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -347,7 +347,7 @@ async fn test_update_execution_status() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -391,7 +391,7 @@ async fn test_update_execution_result() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -436,7 +436,7 @@ async fn test_update_execution_executor() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -479,7 +479,7 @@ async fn test_update_execution_status_transitions() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let exec = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -569,7 +569,7 @@ async fn test_update_execution_failed_status() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -613,7 +613,7 @@ async fn test_update_execution_no_changes() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -656,7 +656,7 @@ async fn test_delete_execution() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Completed,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -721,7 +721,7 @@ async fn test_find_executions_by_status() {
|
||||
executor: None,
|
||||
status: *status,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -767,7 +767,7 @@ async fn test_find_executions_by_enforcement() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
let _exec1 = ExecutionRepository::create(&pool, exec1_input)
|
||||
.await
|
||||
@@ -785,7 +785,7 @@ async fn test_find_executions_by_enforcement() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -828,7 +828,7 @@ async fn test_parent_child_execution_hierarchy() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let parent = ExecutionRepository::create(&pool, parent_input)
|
||||
@@ -848,7 +848,7 @@ async fn test_parent_child_execution_hierarchy() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let child = ExecutionRepository::create(&pool, child_input)
|
||||
@@ -891,7 +891,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let grandparent = ExecutionRepository::create(&pool, grandparent_input)
|
||||
@@ -909,7 +909,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let parent = ExecutionRepository::create(&pool, parent_input)
|
||||
@@ -927,7 +927,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let child = ExecutionRepository::create(&pool, child_input)
|
||||
@@ -968,7 +968,7 @@ async fn test_execution_timestamps() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -1038,7 +1038,7 @@ async fn test_execution_config_json() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let execution = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
@@ -1070,7 +1070,7 @@ async fn test_execution_result_json() {
|
||||
executor: None,
|
||||
status: ExecutionStatus::Running,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
};
|
||||
|
||||
let created = ExecutionRepository::create(&pool, input).await.unwrap();
|
||||
|
||||
@@ -50,7 +50,7 @@ async fn test_create_inquiry_minimal() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -109,7 +109,7 @@ async fn test_create_inquiry_with_response_schema() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -166,7 +166,7 @@ async fn test_create_inquiry_with_timeout() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -219,7 +219,7 @@ async fn test_create_inquiry_with_assigned_user() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -306,7 +306,7 @@ async fn test_find_inquiry_by_id() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -366,7 +366,7 @@ async fn test_get_inquiry_by_id() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -434,7 +434,7 @@ async fn test_list_inquiries() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -494,7 +494,7 @@ async fn test_update_inquiry_status() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -549,7 +549,7 @@ async fn test_update_inquiry_status_transitions() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -633,7 +633,7 @@ async fn test_update_inquiry_response() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -690,7 +690,7 @@ async fn test_update_inquiry_with_response_and_status() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -747,7 +747,7 @@ async fn test_update_inquiry_assignment() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -813,7 +813,7 @@ async fn test_update_inquiry_no_changes() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -888,7 +888,7 @@ async fn test_delete_inquiry() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -946,7 +946,7 @@ async fn test_delete_execution_cascades_to_inquiries() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -1012,7 +1012,7 @@ async fn test_find_inquiries_by_status() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -1090,7 +1090,7 @@ async fn test_find_inquiries_by_execution() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -1108,7 +1108,7 @@ async fn test_find_inquiries_by_execution() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -1171,7 +1171,7 @@ async fn test_inquiry_timestamps_auto_managed() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@@ -1237,7 +1237,7 @@ async fn test_inquiry_complex_response_schema() {
|
||||
executor: None,
|
||||
status: attune_common::models::enums::ExecutionStatus::Requested,
|
||||
result: None,
|
||||
workflow_task: None,
|
||||
workflow_task: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
||||
@@ -482,7 +482,7 @@ async fn test_list_rules() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: true,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
@@ -535,7 +535,7 @@ async fn test_list_rules_ordered_by_ref() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: true,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
@@ -983,7 +983,7 @@ async fn test_find_rules_by_pack() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: true,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
@@ -1060,7 +1060,7 @@ async fn test_find_rules_by_action() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: true,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
@@ -1141,7 +1141,7 @@ async fn test_find_rules_by_trigger() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: true,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
@@ -1172,7 +1172,9 @@ async fn test_find_rules_by_trigger() {
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(trigger1_rules.len(), 2);
|
||||
assert!(trigger1_rules.iter().all(|r| r.trigger == Some(trigger1.id)));
|
||||
assert!(trigger1_rules
|
||||
.iter()
|
||||
.all(|r| r.trigger == Some(trigger1.id)));
|
||||
|
||||
let trigger2_rules = RuleRepository::find_by_trigger(&pool, trigger2.id)
|
||||
.await
|
||||
@@ -1217,7 +1219,7 @@ async fn test_find_enabled_rules() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: true,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
@@ -1239,7 +1241,7 @@ async fn test_find_enabled_rules() {
|
||||
action_params: json!({}),
|
||||
trigger_params: json!({}),
|
||||
enabled: false,
|
||||
is_adhoc: false,
|
||||
is_adhoc: false,
|
||||
};
|
||||
|
||||
RuleRepository::create(&pool, input).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user