Fetch a file the declaration names by digest from the bus's object bucket and verify it before writing, and run the integration tests in the merge check (issue 1695, ADR 0486 step 2) #126

Merged
mesh-tools merged 5 commits from fix/1695-fetch-by-digest into main 2026-10-21 13:33:55 +00:00
Showing only changes of commit 4cfa0469fd - Show all commits
@@ -1,5 +1,3 @@
//go:build integration
package link
import (
@@ -13,11 +11,12 @@ import (
"github.com/nats-io/nats.go"
)
// 1695/AC7: against a real bus with the bucket declaration-files, over the bus's default maximum message size, a
// 1695/AC7: (untagged on purpose: the merge check of the trunk runs the tagless suite against its throwaway bus, and the
// test skips without MESH_TEST_NATS) against a real bus with the bucket declaration-files, over the bus's default maximum message size, a
// node-engine's link reads three objects that together are over 3 MiB by name, verifies each with File.Verify, and
// refuses an object that is absent, one larger than the declaration says, and one that differs by a byte.
//
// MESH_TEST_NATS=nats://127.0.0.1:4222 go test -tags integration ./internal/link/ -run TestFilesAreFetchedByDigestFromTheBucket
// MESH_TEST_NATS=nats://127.0.0.1:4222 go test ./internal/link/ -run TestFilesAreFetchedByDigestFromTheBucket
//
// The bucket is made here: in the mesh the controller makes and fills it, and the node-engine only reads.
func TestFilesAreFetchedByDigestFromTheBucket(t *testing.T) {