mesh/merge-gate pass: builds networkmanager, systemd-networkd, sent nowhere; no bus step; 4 wait(s) for a person; every machine composes with the change as…
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group feat/node-uplink-verbs delivered: every member is delivered
What a machine resolves through had no tool: the resolver file and who wrote it, and every link with its default route and the resolvers its manager knows. Each holder serves the same two node-uplink verbs; the reading is one text carried by both, held to it by a test, and only asking the manager for a link's names is each holder's own.
39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
package main
|
|
|
|
// The holders of node-uplink whose bundles carry uplink.go (novox/hq ADR 0241). Each builds alone, so each
|
|
// has its own copy; this test, itself one of the copied files, holds them to one text wherever the siblings
|
|
// are present.
|
|
|
|
import (
|
|
"bytes"
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
var holders = []string{"networkmanager", "systemd-networkd"}
|
|
|
|
func TestEveryUplinkHolderCarriesTheSameCopy(t *testing.T) {
|
|
compared := 0
|
|
for _, module := range holders {
|
|
dir := filepath.Join("..", "..", "..", module, "cmd", "uplink-tools")
|
|
if _, err := os.Stat(dir); err != nil {
|
|
continue
|
|
}
|
|
for _, f := range []string{"uplink.go", "uplink_test.go", "main.go", "copies_test.go"} {
|
|
mine, err := os.ReadFile(f)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
theirs, err := os.ReadFile(filepath.Join(dir, f))
|
|
if err != nil || !bytes.Equal(mine, theirs) {
|
|
t.Errorf("%s's copy of %s differs from this one: change every copy together", module, f)
|
|
}
|
|
}
|
|
compared++
|
|
}
|
|
if compared == 0 {
|
|
t.Log("no sibling copies beside this module")
|
|
}
|
|
}
|