author | Alberto Bertogli
<albertito@blitiri.com.ar> 2019-06-22 00:51:10 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2019-06-22 00:51:10 UTC |
parent | b46dad83a09479f68390c7ad41166c9d5222304e |
dnss_test.go | +0 | -11 |
tests/external.sh | +11 | -1 |
diff --git a/dnss_test.go b/dnss_test.go index f70e059..971cd7b 100644 --- a/dnss_test.go +++ b/dnss_test.go @@ -7,7 +7,6 @@ import ( "net/http" "net/url" "os" - "strings" "sync" "testing" @@ -241,16 +240,6 @@ func TestProxyServerDomain(t *testing.T) { } } -func TestDumpFlags(t *testing.T) { - flag.Parse() - flag.Set("https_upstream", "https://montoto/xyz") - - f := dumpFlags() - if !strings.Contains(f, "-https_upstream=https://montoto/xyz\n") { - t.Errorf("Flags string missing canary value: %v", f) - } -} - func TestMonitoringServer(t *testing.T) { addr := testutil.GetFreePort() launchMonitoringServer(addr) diff --git a/tests/external.sh b/tests/external.sh index fd80ec6..902c32f 100755 --- a/tests/external.sh +++ b/tests/external.sh @@ -86,7 +86,7 @@ function resolve() { function get() { URL=$1 - wget -O/dev/null $URL > .wget.log 2>&1 + wget -O.wget.out $URL > .wget.log 2>&1 } echo "## Misc" @@ -106,6 +106,16 @@ mv .dnss.log .dnss.http.log wait_until_ready tcp 1999 +echo "## Checking /debug/flags" +if ! get "http://localhost:1900/debug/flags"; then + echo "Failed to get /debug/flags" + exit 1 +fi +if ! grep -q "testing__insecure_http=true" .wget.out; then + echo "/debug/flags did not contain expected flags (see .wget.out)" + exit 1 +fi + echo "## Autodetect against dnss" dnss -enable_dns_to_https -dns_listen_addr "localhost:1053" \ -testing__insecure_http \