build modules: every one runs the runs-counted kit case; failurekit refuses one that does not (A-489a)
Builds: design 47 G §24; lead answers A-489a, A-489b Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -62,3 +62,13 @@ func TestTheStepsSayAFailedNetworkAsATransportFault(t *testing.T) {
|
||||
func TestTheStepsCanSayAStepsEnd(t *testing.T) {
|
||||
conformance.StepEnds(t, (&Module{Node: "kitnode"}).askSteps(nil))
|
||||
}
|
||||
|
||||
// A-489a: the module's puller counts the runs its steps state says started, not the bus's deliveries (an ask given back before
|
||||
// it ran is no run), so the poison rule never ends an ask that never ran.
|
||||
func TestThePullerCountsRunsThatStarted(t *testing.T) {
|
||||
conformance.RunsCounted(t, func(read func(string) (json.RawMessage, error)) *steprun.Puller {
|
||||
m := &Module{Node: "kitnode", Capacity: func() int { return 1 }}
|
||||
m.ReadSteps = StateRead{Get: read}
|
||||
return m.Puller(nil, steprun.NewFakeAsks())
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
sdkstep "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/buildstep"
|
||||
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/steprun"
|
||||
@@ -50,3 +51,13 @@ func TestTheStepsSayAFailedNetworkAsATransportFault(t *testing.T) {
|
||||
func TestTheStepsCanSayAStepsEnd(t *testing.T) {
|
||||
conformance.StepEnds(t, (&Module{Node: "kitnode"}).askSteps(nil))
|
||||
}
|
||||
|
||||
// A-489a: the module's puller counts the runs its steps state says started, not the bus's deliveries (an ask given back before
|
||||
// it ran is no run), so the poison rule never ends an ask that never ran.
|
||||
func TestThePullerCountsRunsThatStarted(t *testing.T) {
|
||||
conformance.RunsCounted(t, func(read func(string) (json.RawMessage, error)) *steprun.Puller {
|
||||
m := &Module{Node: "kitnode", Capacity: func() int { return 1 }}
|
||||
m.ReadSteps = StateRead{Get: read}
|
||||
return m.Puller(nil, steprun.NewFakeAsks())
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/steprun"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -55,3 +56,13 @@ func TestTheStepsSayAFailedNetworkAsATransportFault(t *testing.T) {
|
||||
func TestTheStepsCanSayAStepsEnd(t *testing.T) {
|
||||
conformance.StepEnds(t, (&Module{Node: "kitnode"}).askSteps(nil))
|
||||
}
|
||||
|
||||
// A-489a: the module's puller counts the runs its steps state says started, not the bus's deliveries (an ask given back before
|
||||
// it ran is no run), so the poison rule never ends an ask that never ran.
|
||||
func TestThePullerCountsRunsThatStarted(t *testing.T) {
|
||||
conformance.RunsCounted(t, func(read func(string) (json.RawMessage, error)) *steprun.Puller {
|
||||
m := &Module{Node: "kitnode", Capacity: func() int { return 1 }}
|
||||
m.ReadSteps = StateRead{Get: read}
|
||||
return m.Puller(nil, steprun.NewFakeAsks())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user