24 lines
520 B
Go
24 lines
520 B
Go
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
package utils_test
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeUser/internal/utils"
|
|
"testing"
|
|
)
|
|
|
|
func TestLookupCNAME(t *testing.T) {
|
|
for _, domain := range []string{"www.yun4s.cn", "example.com", "goedge.cn"} {
|
|
result, err := utils.LookupCNAME(domain)
|
|
t.Log(domain, "=>", result, err)
|
|
}
|
|
}
|
|
|
|
func TestLookupNS(t *testing.T) {
|
|
t.Log(utils.LookupNS("goedge.cn"))
|
|
}
|
|
|
|
func TestLookupTXT(t *testing.T) {
|
|
t.Log(utils.LookupTXT("_acme-challenge.dl"))
|
|
}
|