From 19bf820fa7f822ff278912f11e9cc33ff78e9697 Mon Sep 17 00:00:00 2001 From: Daniel Swarbrick Date: Fri, 3 Jan 2020 14:08:14 +0100 Subject: [PATCH] Skip network dependent test in short mode (#566) Signed-off-by: Daniel Swarbrick --- prober/http_test.go | 2 +- prober/utils_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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) -- 2.25.1