Skip network dependent test in short mode (#566)
authorDaniel Swarbrick <daniel.swarbrick@cloud.ionos.com>
Fri, 3 Jan 2020 13:08:14 +0000 (14:08 +0100)
committerBrian Brazil <brian.brazil@robustperception.io>
Fri, 3 Jan 2020 13:08:14 +0000 (13:08 +0000)
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@cloud.ionos.com>
prober/http_test.go
prober/utils_test.go

index 637784f35ed7df2c05bd79d4fc8e695077257990..29088bf81263cb8656ad446b0b60957f03ecdb14 100644 (file)
@@ -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)
index dc0e8f96c5f3c59da59f13695e45376e19bdea0a..42dfd9eb8ab3ad7c1cb5a5954402064233a58cbf 100644 (file)
@@ -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)