mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-05 00:50:21 +00:00
ddns: retreive dns servers from context (#1034)
This commit is contained in:
1 parent
c3ec52e392
commit
38c2374bad
5 files changed
+17
-21
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package ddns
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
@@ -34,8 +35,9 @@ func TestSplitDomainSOA(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
provider := &Provider{ctx: context.WithValue(context.Background(), DNSServerKey{}, []string{"1.1.1.1:53"})}
|
||||
for _, c := range cases {
|
||||
prefix, zone, err := splitDomainSOA(c.domain)
|
||||
prefix, zone, err := provider.splitDomainSOA(c.domain)
|
||||
if err != nil {
|
||||
t.Fatalf("Error: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user