checker: adopt unified ReportContext reporter signature
Follow the checker-sdk-go interface consolidation: reporter methods now take sdk.ReportContext and read the payload via ctx.Data() instead of the raw json.RawMessage parameter. Backed by the same underlying logic — this is a signature migration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aae1452e12
commit
df4a7a89d1
9 changed files with 480 additions and 32 deletions
|
|
@ -13,6 +13,11 @@ func TestDiscoverEndpoints_contextURLOnly(t *testing.T) {
|
|||
if got[0].Host != "dav.example.com" || got[0].Port != 443 || got[0].Type != "tls" {
|
||||
t.Errorf("unexpected endpoint: %+v", got[0])
|
||||
}
|
||||
// SNI must be set unconditionally (uniform with the XMPP checker),
|
||||
// even when it is equal to Host.
|
||||
if got[0].SNI != "dav.example.com" {
|
||||
t.Errorf("SNI = %q, want dav.example.com", got[0].SNI)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDiscoverEndpoints_nonDefaultPort(t *testing.T) {
|
||||
|
|
@ -46,6 +51,9 @@ func TestDiscoverEndpoints_srvTargets(t *testing.T) {
|
|||
hosts := map[string]bool{}
|
||||
for _, e := range got {
|
||||
hosts[e.Host] = true
|
||||
if e.SNI != e.Host {
|
||||
t.Errorf("endpoint %+v: SNI=%q, want %q (equal to Host)", e, e.SNI, e.Host)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{"dav.example.com", "dav-backend-1.example.net", "dav-backend-2.example.net"} {
|
||||
if !hosts[want] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue