update ddns on server update (#1050)

This commit is contained in:
UUBulb
2025-03-31 19:41:04 +08:00
committed by GitHub
parent 62ea87da74
commit 67c129635e
7 changed files with 69 additions and 48 deletions

View File

@@ -35,9 +35,10 @@ func TestSplitDomainSOA(t *testing.T) {
},
}
provider := &Provider{ctx: context.WithValue(context.Background(), DNSServerKey{}, []string{"1.1.1.1:53"})}
ctx := context.WithValue(context.Background(), DNSServerKey{}, []string{"1.1.1.1:53"})
provider := &Provider{}
for _, c := range cases {
prefix, zone, err := provider.splitDomainSOA(c.domain)
prefix, zone, err := provider.splitDomainSOA(ctx, c.domain)
if err != nil {
t.Fatalf("Error: %s", err)
}