State the declaration Version the engine's composer writes
The composer is the node-engine's own build, its declarations written by mesh-sdk's composition inside it, so the manifest states the Version it writes beside the one it reads; the manifest test holds both to the engine's declaration Version. Builds: design 47 H2 §813 (12); H-A-416 (2)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
"slug": "host",
|
||||
"class": "core",
|
||||
"declaration-reads": 2,
|
||||
"declaration-writes": 2,
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ func testTheManifestConsumesTheBackupEvent(t *testing.T) {
|
||||
// delivery (H-A-388 and its addendum, H-A-394).
|
||||
if needs, err := catalogue.ManifestNeeds(raw); err != nil || len(needs) == 0 {
|
||||
t.Fatalf("the manifest's needs: %v, %v", needs, err)
|
||||
} else if missing := catalogue.MissingManifestReads(needs, nil); !slices.Equal(missing, []string{"word:class", "word:declaration-reads"}) {
|
||||
} else if missing := catalogue.MissingManifestReads(needs, nil); !slices.Equal(missing, []string{"word:class", "word:declaration-reads", "word:declaration-writes"}) {
|
||||
t.Errorf("the manifest needs %v, which an engine stating nothing does not read: its new build would be held", missing)
|
||||
}
|
||||
// Design 47 H2 §813 (12), H-A-388: it states the declaration Version it reads, the one its contract parses, so the
|
||||
@@ -151,8 +151,10 @@ func testTheManifestConsumesTheBackupEvent(t *testing.T) {
|
||||
if parsed, err := catalogue.Decode(raw); err != nil || parsed.Class != catalogue.ClassCore {
|
||||
t.Errorf("the manifest's class is %q, and the node-engine claims a seat (%v)", parsed.Class, err)
|
||||
}
|
||||
if parsed, err := catalogue.Decode(raw); err != nil || parsed.DeclarationReads != declaration.Version {
|
||||
t.Errorf("the manifest states it reads declaration Version %d, and the engine reads %d (%v)", parsed.DeclarationReads, declaration.Version, err)
|
||||
// H-A-416 (2): and the Version its composer writes, since the composer is the engine's own build.
|
||||
if parsed, err := catalogue.Decode(raw); err != nil || parsed.DeclarationReads != declaration.Version || parsed.DeclarationWrites != declaration.Version {
|
||||
t.Errorf("the manifest states it reads declaration Version %d and writes %d, and the engine reads and writes %d (%v)",
|
||||
parsed.DeclarationReads, parsed.DeclarationWrites, declaration.Version, err)
|
||||
}
|
||||
// 774 (the alert table): the state health, one key per node, the node's own health report, kept until
|
||||
// written again (no TTL: a node that stops writing keeps its last word, which the watchman reads with its time).
|
||||
|
||||
Reference in New Issue
Block a user