mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-13 18:03:10 -06:00
common/test/client: Do not verify TLS certs for testing
We will commonly use self-signed certs.
This commit is contained in:
parent
536e7402aa
commit
8b9205062b
|
|
@ -15,6 +15,7 @@
|
||||||
package test
|
package test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
@ -71,6 +72,11 @@ func CanonicalJSONInput(jsonData []string) []string {
|
||||||
func (r *Request) Do() error {
|
func (r *Request) Do() error {
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
|
Transport: &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{
|
||||||
|
InsecureSkipVerify: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
res, err := client.Do(r.Req)
|
res, err := client.Do(r.Req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue