From: Daniel Swarbrick Date: Fri, 3 Jan 2020 13:08:14 +0000 (+0100) Subject: Skip network dependent test in short mode (#566) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=19bf820fa7f822ff278912f11e9cc33ff78e9697;p=blackbox_exporter.git Skip network dependent test in short mode (#566) Signed-off-by: Daniel Swarbrick --- diff --git a/prober/http_test.go b/prober/http_test.go index 637784f..29088bf 100644 --- a/prober/http_test.go +++ b/prober/http_test.go @@ -651,7 +651,7 @@ func TestHTTPUsesTargetAsTLSServerName(t *testing.T) { func TestRedirectToTLSHostWorks(t *testing.T) { if testing.Short() { - t.Skip("skipping network dependant test") + t.Skip("skipping network dependent test") } ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "https://prometheus.io", http.StatusFound) diff --git a/prober/utils_test.go b/prober/utils_test.go index dc0e8f9..42dfd9e 100644 --- a/prober/utils_test.go +++ b/prober/utils_test.go @@ -117,6 +117,9 @@ func generateTestCertificate(expiry time.Time, IPAddressSAN bool) ([]byte, []byt } func TestChooseProtocol(t *testing.T) { + if testing.Short() { + t.Skip("skipping network dependent test") + } ctx := context.Background() registry := prometheus.NewPedanticRegistry() w := log.NewSyncWriter(os.Stderr)