MCPcopy Create free account
hub / github.com/astercloud/aster / TestStepDependencies

Function TestStepDependencies

pkg/executionplan/types_test.go:465–489  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

463}
464
465func 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
491func TestRetryConfiguration(t *testing.T) {
492 plan := NewExecutionPlan("Test plan")

Callers

nothing calls this directly

Calls 2

AddStepMethod · 0.95
NewExecutionPlanFunction · 0.85

Tested by

no test coverage detected