diff --git a/modules/mesh-build-go/cmd/mesh-build-go/asks_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/asks_integration_test.go index 9fe1d64d0..b1b9bc13c 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/asks_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/asks_integration_test.go @@ -87,7 +87,11 @@ func TestTheModuleTakesADeliveryAskBeforeAnEarlierCheck(t *testing.T) { ended := 0 states.mu.Lock() for _, a := range []sdkstep.StepAsk{first, check} { - key, _ := sdkstep.AskStepKey("ace", a.ID) + asker := "mesh-delivery-checker" // a named ask's step is keyed under its asker, main's under its node (ยง481) + if a.Kind == sdkstep.AskDelivery { + asker = "" + } + key, _ := sdkstep.AskStepKey(asker, "ace", a.ID) v := append([]sdkstep.Step(nil), states.steps[key]...) ran[a.ID] = v if len(v) > 0 && v[len(v)-1].State != sdkstep.StepRunning { diff --git a/modules/mesh-build-go/cmd/mesh-build-go/asks_test.go b/modules/mesh-build-go/cmd/mesh-build-go/asks_test.go index e68553468..b8e3f6802 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/asks_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/asks_test.go @@ -57,7 +57,7 @@ func TestAPulledAskRunsTheBuildAndItsKeyNamesTheReference(t *testing.T) { ctx, stop := context.WithCancel(context.Background()) defer stop() go p.Pull(ctx) - key, _ := sdkstep.AskStepKey("ace", a.ID) + key, _ := sdkstep.AskStepKey("", "ace", a.ID) var step sdkstep.Step for deadline := time.Now().Add(30 * time.Second); ; time.Sleep(5 * time.Millisecond) { states.mu.Lock() diff --git a/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go index c793c02b7..ed2923b9e 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go @@ -212,7 +212,7 @@ func TestAComposeAskIsBuiltOnceAndAnsweredOnTheBus(t *testing.T) { if _, err := js.Publish(ctx, subject, raw); err != nil { t.Fatal(err) } - key, _ := sdkstep.AskStepKey("ace", a.ID) + key, _ := sdkstep.AskStepKey("", "ace", a.ID) for deadline := time.Now().Add(90 * time.Second); time.Now().Before(deadline); time.Sleep(50 * time.Millisecond) { states.mu.Lock() v := states.steps[key] diff --git a/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go index 771d5d540..e09f87c49 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go @@ -111,7 +111,7 @@ func TestARunAskIsAnsweredOnTheBusAndItsProgramIsShutOff(t *testing.T) { if _, err := js.Publish(ctx, subject, raw); err != nil { t.Fatal(err) } - stepKey, _ := sdkstep.AskStepKey("ace", a.ID) + stepKey, _ := sdkstep.AskStepKey("", "ace", a.ID) var step sdkstep.Step for deadline := time.Now().Add(60 * time.Second); time.Now().Before(deadline); time.Sleep(50 * time.Millisecond) { states.mu.Lock() diff --git a/modules/mesh-build-image/cmd/mesh-build-image/asks_test.go b/modules/mesh-build-image/cmd/mesh-build-image/asks_test.go index 4c9caabd4..7b6767599 100644 --- a/modules/mesh-build-image/cmd/mesh-build-image/asks_test.go +++ b/modules/mesh-build-image/cmd/mesh-build-image/asks_test.go @@ -43,7 +43,7 @@ func TestAPulledImageAskCopiesThenBuilds(t *testing.T) { ctx, stop := context.WithCancel(context.Background()) defer stop() go p.Pull(ctx) - key, _ := sdkstep.AskStepKey("ace", a.ID) + key, _ := sdkstep.AskStepKey("", "ace", a.ID) var step sdkstep.Step for deadline := time.Now().Add(3 * time.Second); ; time.Sleep(5 * time.Millisecond) { states.mu.Lock() diff --git a/modules/mesh-build-node/cmd/mesh-build-node/asks_test.go b/modules/mesh-build-node/cmd/mesh-build-node/asks_test.go index 00c148906..8bafad60c 100644 --- a/modules/mesh-build-node/cmd/mesh-build-node/asks_test.go +++ b/modules/mesh-build-node/cmd/mesh-build-node/asks_test.go @@ -70,7 +70,7 @@ func TestAPulledNodeAskRunsItsJob(t *testing.T) { if got := strings.Join(calls, ","); got != "build_node_fetch,build_node_build,build_node_fetch,build_node_test" { t.Errorf("calls = %s, want the delivery ask's job first, then the check's", got) } - key, _ := sdkstep.AskStepKey("ace", build.ID) + key, _ := sdkstep.AskStepKey("", "ace", build.ID) states.mu.Lock() v := states.steps[key] states.mu.Unlock()