BM4a (sdk): a build seat's holder keeps its outputs in its outputs objects
steprun.OutputsStore names the holder's `outputs` objects, which its manifest requires with their cap and max-age, in place of the steps state's own objects store. Builds: design 47 H2 §791, §820; H-A-399 (1)
This commit is contained in:
@@ -4,13 +4,12 @@ import (
|
||||
"fmt"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/buscalls"
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
)
|
||||
|
||||
// OutputsStore is the local name of the object store a build seat's holder keeps a run's answer in when it is over what
|
||||
// step-ended carries inline (design 47 G A-254): the steps state's own objects store, `steps-objects`, which the holder's manifest
|
||||
// `requires` asks for with its steps state (design 47 G A-313).
|
||||
var OutputsStore = catalogue.StateObjectsName("steps")
|
||||
// OutputsStore is the local name of the object store a build seat's holder keeps a run's output in (design 47 H2 §791,
|
||||
// §820): its `outputs` objects, which the holder's manifest `requires` with their cap and max-age, and which the seat's verb
|
||||
// output reads (H-A-399 (1)).
|
||||
const OutputsStore = "outputs"
|
||||
|
||||
// OutputObjects is the object store of OutputsStore as a holder uses it (mesh-sdk busstate.ObjectsOf(OutputsStore)).
|
||||
type OutputObjects interface {
|
||||
|
||||
@@ -34,8 +34,9 @@ func TestOutputsKeptAreRead(t *testing.T) {
|
||||
if _, err := ReadOutputFrom(st)("output.none"); err == nil {
|
||||
t.Fatal("an absent answer was read")
|
||||
}
|
||||
if err := KeepOutputIn(nil)("o", nil); err == nil || !strings.Contains(err.Error(), "steps-objects") {
|
||||
t.Fatalf("no store kept an answer, or did not name the steps state's objects store: %v", err)
|
||||
// Design 47 H2 §791: the store is the holder's `outputs` objects.
|
||||
if err := KeepOutputIn(nil)("o", nil); err == nil || !strings.Contains(err.Error(), "no outputs store") {
|
||||
t.Fatalf("no store kept an answer, or did not name the outputs store: %v", err)
|
||||
}
|
||||
if _, err := ReadOutputFrom(nil)("o"); err == nil {
|
||||
t.Fatal("no store read an answer")
|
||||
|
||||
Reference in New Issue
Block a user