working out the worker/execution interface

This commit is contained in:
2026-02-08 12:55:33 -06:00
parent c62f41669d
commit a74e13fa0b
108 changed files with 21162 additions and 674 deletions

View File

@@ -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,