mesh/delivery-group group feat/sdk1 rejected: composed together: the checker's verdict at the members' heads (428d048dd50a): unit: git.novox.be/novox/mesh-sdk/…
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: unit: git.novox.be/novox/mesh-sdk/go/process.TestStatePutWritesAKeyWhole: a Put through a short blackout: 0, mesh-mail's state send…
Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
24 lines
776 B
Go
24 lines
776 B
Go
package catalogue
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// The resolver's template sees every zone with where it is answered, in zone order.
|
|
func TestTheResolversTemplateRangesTheZones(t *testing.T) {
|
|
m := Manifest{Module: "dnsmasq", Facts: map[string]RosterFile{"zones": {
|
|
Path: "/etc/mesh-resolver/zones.conf",
|
|
Template: "{{range .Zones}}server=/{{.Zone}}/{{.Address}}#{{.Port}}\n{{end}}",
|
|
}}}
|
|
out, err := FactsWithZonesInto(m, Resolution{Node: "anchor"}, nil, nil, nil, "", []ZoneAt{
|
|
{Zone: "zeta", Address: "10.77.0.2", Port: 53},
|
|
{Zone: "incus", Address: "10.77.0.3", Port: 15353},
|
|
})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if got := out[0]["content"]; got != "server=/incus/10.77.0.3#15353\nserver=/zeta/10.77.0.2#53\n" {
|
|
t.Fatalf("the resolver was told %q", got)
|
|
}
|
|
}
|