Test budget: the approval mark's two tables replace two tests folded into their neighbours
The tool runner ends milestone G with no more tests than it started with: the no-responders test takes the 503 case, and the stated-capabilities test takes the sent-object row. Builds: design 46 7-approval-mark §22; design 47 G §626 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -2,7 +2,6 @@ package runtime
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.novox.be/novox/mesh-sdk/go/buscalls"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -144,16 +143,3 @@ func TestTheRunnerStatesTheCapabilitiesOfItsCallsInItsPing(t *testing.T) {
|
||||
t.Errorf("the runner states %q (%v), want its bus-state and ledger calls", ping.Metadata[announce.Capabilities], err)
|
||||
}
|
||||
}
|
||||
|
||||
// Design 47 G §462: the call that reads a sent object is listed under the bus state capability, and the ledger calls keep theirs.
|
||||
func TestTheSentObjectCallBelongsToTheBusStateCapability(t *testing.T) {
|
||||
for c, method := range map[string]string{CapBusStateCalls: buscalls.ObjectsSentGet} {
|
||||
found := false
|
||||
for _, m := range callFamilies[c] {
|
||||
found = found || m == method
|
||||
}
|
||||
if !found {
|
||||
t.Errorf("%s does not list %s", c, method)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -207,6 +208,10 @@ func TestEveryCallOfAStatedCapabilityIsAnswered(t *testing.T) {
|
||||
if got := strings.Join(CallCapabilities(), ","); got != "approval-mark/1,bus-state-calls,ledger-calls,put-sessions,seat-settle-delay" {
|
||||
t.Fatalf("the runner states %s", got)
|
||||
}
|
||||
// Design 47 G §462: the call that reads a sent object is listed under the bus state capability.
|
||||
if !slices.Contains(callFamilies[CapBusStateCalls], buscalls.ObjectsSentGet) {
|
||||
t.Errorf("%s does not list %s", CapBusStateCalls, buscalls.ObjectsSentGet)
|
||||
}
|
||||
for capability, methods := range callFamilies {
|
||||
for _, method := range methods {
|
||||
t.Run(capability+" "+method, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user