working out the worker/execution interface
This commit is contained in:
@@ -37,6 +37,7 @@ async fn test_create_execution_basic() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: Some(json!({"param1": "value1"})),
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -69,6 +70,7 @@ async fn test_create_execution_without_action() {
|
||||
action: None,
|
||||
action_ref: action_ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -101,6 +103,7 @@ async fn test_create_execution_with_all_fields() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: Some(json!({"timeout": 300, "retry": true})),
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None, // Don't reference non-existent identity
|
||||
@@ -135,6 +138,7 @@ async fn test_create_execution_with_parent() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -152,6 +156,7 @@ async fn test_create_execution_with_parent() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: Some(parent.id),
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -189,6 +194,7 @@ async fn test_find_execution_by_id() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -240,6 +246,7 @@ async fn test_list_executions() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}_{}", action.r#ref, i),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -284,6 +291,7 @@ async fn test_list_executions_ordered_by_created_desc() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}_{}", action.r#ref, i),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -333,6 +341,7 @@ async fn test_update_execution_status() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -376,6 +385,7 @@ async fn test_update_execution_result() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -420,6 +430,7 @@ async fn test_update_execution_executor() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -462,6 +473,7 @@ async fn test_update_execution_status_transitions() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -551,6 +563,7 @@ async fn test_update_execution_failed_status() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -594,6 +607,7 @@ async fn test_update_execution_no_changes() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -636,6 +650,7 @@ async fn test_delete_execution() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -700,6 +715,7 @@ async fn test_find_executions_by_status() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}_{}", action.r#ref, i),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -745,6 +761,7 @@ async fn test_find_executions_by_enforcement() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}_1", action.r#ref),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -762,6 +779,7 @@ async fn test_find_executions_by_enforcement() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}_{}", action.r#ref, i),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: if i == 2 { None } else { None }, // Can't reference non-existent enforcement
|
||||
executor: None,
|
||||
@@ -804,6 +822,7 @@ async fn test_parent_child_execution_hierarchy() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}.parent", action.r#ref),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -823,6 +842,7 @@ async fn test_parent_child_execution_hierarchy() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}.child_{}", action.r#ref, i),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: Some(parent.id),
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -865,6 +885,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}.grandparent", action.r#ref),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -882,6 +903,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}.parent", action.r#ref),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: Some(grandparent.id),
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -899,6 +921,7 @@ async fn test_nested_execution_hierarchy() {
|
||||
action: Some(action.id),
|
||||
action_ref: format!("{}.child", action.r#ref),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: Some(parent.id),
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -939,6 +962,7 @@ async fn test_execution_timestamps() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -1008,6 +1032,7 @@ async fn test_execution_config_json() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: Some(complex_config.clone()),
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -1039,6 +1064,7 @@ async fn test_execution_result_json() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
|
||||
@@ -44,6 +44,7 @@ async fn test_create_inquiry_minimal() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -102,6 +103,7 @@ async fn test_create_inquiry_with_response_schema() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -158,6 +160,7 @@ async fn test_create_inquiry_with_timeout() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -210,6 +213,7 @@ async fn test_create_inquiry_with_assigned_user() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -296,6 +300,7 @@ async fn test_find_inquiry_by_id() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -355,6 +360,7 @@ async fn test_get_inquiry_by_id() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -422,6 +428,7 @@ async fn test_list_inquiries() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -481,6 +488,7 @@ async fn test_update_inquiry_status() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -535,6 +543,7 @@ async fn test_update_inquiry_status_transitions() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -618,6 +627,7 @@ async fn test_update_inquiry_response() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -674,6 +684,7 @@ async fn test_update_inquiry_with_response_and_status() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -730,6 +741,7 @@ async fn test_update_inquiry_assignment() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -795,6 +807,7 @@ async fn test_update_inquiry_no_changes() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -869,6 +882,7 @@ async fn test_delete_inquiry() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -926,6 +940,7 @@ async fn test_delete_execution_cascades_to_inquiries() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -991,6 +1006,7 @@ async fn test_find_inquiries_by_status() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -1068,6 +1084,7 @@ async fn test_find_inquiries_by_execution() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -1085,6 +1102,7 @@ async fn test_find_inquiries_by_execution() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -1147,6 +1165,7 @@ async fn test_inquiry_timestamps_auto_managed() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
@@ -1212,6 +1231,7 @@ async fn test_inquiry_complex_response_schema() {
|
||||
action: Some(action.id),
|
||||
action_ref: action.r#ref.clone(),
|
||||
config: None,
|
||||
env_vars: None,
|
||||
parent: None,
|
||||
enforcement: None,
|
||||
executor: None,
|
||||
|
||||
Reference in New Issue
Block a user