Files
strom/client/dns_test.go
T
2026-03-19 23:50:28 +01:00

22 lines
411 B
Go

package client
import "testing"
func TestDoDNS(t *testing.T) {
type Case struct {
Input string
Output string
}
for _, c := range []Case{{"localhost", "127.0.0.1:25565"}, {"1f2d.net", "50.114.4.126:25565"}} {
t.Logf("Testing %s", c.Input)
out, err := DoDns(c.Input)
if err != nil {
t.Error(err)
continue
}
if out != c.Output {
t.Errorf("Expected %s, got %s", c.Output, out)
}
}
}