Merge feat/r4e-builder into feat/r4e (R4e integration)
The checker's go.mod and go.sum conflicted on the mesh-sdk pin (checker lane 9cb4d59, builder lane e76a5a3): every module touched is pinned to the sdk lane's newest head d1af87a until the final SDK head.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package bridge
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/delivery"
|
||||
)
|
||||
|
||||
// ADR 0495 clause 1 with the lead's decision L8 of R4e: the forge bridge is no reader of a manifest's `paths`. A merge of a
|
||||
// module whose artifacts name their paths (mesh-sdk's module.json at 9cb4d59) gives a message that carries the manifest as
|
||||
// the forge answered it and no named path's object: the indexer asks the forge for those itself.
|
||||
func TestAMergedMessageCarriesNoNamedPathsTheBridgeDerived(t *testing.T) {
|
||||
raw, err := os.ReadFile("testdata/mesh-sdk-9cb4d59.module.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
files := func(owner, repo, path, ref string) ([]byte, error) {
|
||||
if path == "module.json" {
|
||||
return raw, nil
|
||||
}
|
||||
return nil, ErrNotFound
|
||||
}
|
||||
var calls []call
|
||||
msg, err := Convert(mergedSubject, mergedBody(map[string]any{"repo": "mesh-sdk", "module_dirs": []string{""}}), treesOf(&calls, "r0", map[string]string{"": "r0"}, nil), files)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
f, err := delivery.DecodeForge(msg.Data)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(f.Paths) != 0 || f.Manifests[""] != string(raw) || len(calls) != 1 {
|
||||
t.Errorf("message paths %v, manifest carried %v, trees asked %d times; want no paths, the manifest, one ask", f.Paths, f.Manifests[""] == string(raw), len(calls))
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"module": "mesh-sdk",
|
||||
"version": "1",
|
||||
"slug": "sdk",
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{
|
||||
"name": "lib",
|
||||
"kind": "package",
|
||||
"language": "typescript",
|
||||
"paths": ["src", "test", "package.json", "package-lock.json", "tsconfig.json"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"resources": []
|
||||
}
|
||||
Reference in New Issue
Block a user