(t *testing.T)
| 463 | } |
| 464 | |
| 465 | func TestStepDependencies(t *testing.T) { |
| 466 | plan := NewExecutionPlan("Test plan with dependencies") |
| 467 | |
| 468 | step1 := plan.AddStep("install", "Install dependencies", nil) |
| 469 | step2 := plan.AddStep("build", "Build project", nil) |
| 470 | step2.DependsOn = []string{step1.ID} |
| 471 | |
| 472 | step3 := plan.AddStep("test", "Run tests", nil) |
| 473 | step3.DependsOn = []string{step2.ID} |
| 474 | |
| 475 | // Verify dependencies are set correctly |
| 476 | if len(plan.Steps[1].DependsOn) != 1 { |
| 477 | t.Errorf("expected 1 dependency, got %d", len(plan.Steps[1].DependsOn)) |
| 478 | } |
| 479 | if plan.Steps[1].DependsOn[0] != step1.ID { |
| 480 | t.Errorf("expected dependency on %s, got %s", step1.ID, plan.Steps[1].DependsOn[0]) |
| 481 | } |
| 482 | |
| 483 | if len(plan.Steps[2].DependsOn) != 1 { |
| 484 | t.Errorf("expected 1 dependency, got %d", len(plan.Steps[2].DependsOn)) |
| 485 | } |
| 486 | if plan.Steps[2].DependsOn[0] != step2.ID { |
| 487 | t.Errorf("expected dependency on %s, got %s", step2.ID, plan.Steps[2].DependsOn[0]) |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | func TestRetryConfiguration(t *testing.T) { |
| 492 | plan := NewExecutionPlan("Test plan") |
nothing calls this directly
no test coverage detected