Skip to content

Commit 7f87e8a

Browse files
author
Matthew Fisher
committed
fix(tests): disable TLS for self-signed certs
1 parent 7049c9b commit 7f87e8a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/utils/itutils.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package utils
22

33
import (
44
"bytes"
5+
"crypto/tls"
56
"fmt"
67
"io/ioutil"
78
"log"
@@ -117,7 +118,12 @@ func GetGlobalConfig() *DeisTestConfig {
117118
}
118119

119120
func doCurl(url string) ([]byte, error) {
120-
response, err := http.Get(url)
121+
// disable security check for self-signed certificates
122+
tr := &http.Transport{
123+
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
124+
}
125+
client := &http.Client{Transport: tr}
126+
response, err := client.Get(url)
121127
if err != nil {
122128
return nil, err
123129
}

0 commit comments

Comments
 (0)