Add config test

This commit is contained in:
Dan Ponte 2022-09-15 13:02:25 -04:00
parent 46deb2f780
commit 736753737c
1 changed files with 8 additions and 0 deletions

View File

@ -405,6 +405,10 @@ bootstrapDns:
"tcp-tls:4.4.4.4",
Upstream{Net: NetProtocolTcpTls, Host: "4.4.4.4", Port: 853},
false),
Entry("tcp-tls with common name",
"tcp-tls:example.com#otherexample.com",
Upstream{Net: NetProtocolTcpTls, Host: "example.com", Port: 853, CommonName: strPtr("otherexample.com")},
false),
Entry("DoH without port, use default",
"https:4.4.4.4",
Upstream{Net: NetProtocolHttps, Host: "4.4.4.4", Port: 443},
@ -725,3 +729,7 @@ func writeConfigDir(tmpDir *helpertest.TmpFolder) error {
return f2.Error
}
func strPtr(s string) *string {
return &s
}