hub v0.137.0 source + burn-down round 2 in felhom.eu: R-277 R-581 R-600 R-544 R-855 R-134 R-92 R-292 R-599 R-725 R-728 (hub), R-819 R-857 R-555 R-364 R-587 (gates/tools), R-571 R-129 R-124-runbook (docs); 28 rows closed incl. catalog + agent v0.147.0 rows, R-350 merged into R-132, R-888 opened, R-887 mechanism (249 -> 222)
gates / gates (push) Successful in 2m3s
gates / gates (push) Successful in 2m3s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package cloudflare
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// R-134: the hub's zone lookup must reach the zone for a name more than one label below it, as the
|
||||
// controller's does. Stripping ONE label tried only [a.b.felhom.eu b.felhom.eu] and never felhom.eu,
|
||||
// so the geo-unblock no-op'd with "no active zone found".
|
||||
func TestZoneCandidates(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
in string
|
||||
want []string
|
||||
}{
|
||||
{"a.b.felhom.eu", []string{"a.b.felhom.eu", "b.felhom.eu", "felhom.eu"}},
|
||||
{"demo.felhom.eu", []string{"demo.felhom.eu", "felhom.eu"}},
|
||||
{"felhom.eu", []string{"felhom.eu"}},
|
||||
{"x.y.z.example.co", []string{"x.y.z.example.co", "y.z.example.co", "z.example.co", "example.co"}},
|
||||
{"", nil},
|
||||
{"localhost", []string{"localhost"}},
|
||||
} {
|
||||
if got := zoneCandidates(tc.in); !reflect.DeepEqual(got, tc.want) {
|
||||
t.Errorf("zoneCandidates(%q) = %v, want %v", tc.in, got, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user