Skip to content

Commit d87720c

Browse files
committed
Use http.DefaultTransport.Clone() in UAA version check
Replace manual http.Transport creation with cloning DefaultTransport to preserve default transport settings while configuring TLS.
1 parent 7ea11c1 commit d87720c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

integration/helpers/version.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ func (v UAAVersion) Version() string {
4343
func IsUAAVersionAtLeast(minVersion string) bool {
4444
info := fetchAPIVersion()
4545
uaaUrl := fmt.Sprintf("%s/info", info.Links.UAA.Href)
46-
tr := &http.Transport{
47-
TLSClientConfig: &tls.Config{InsecureSkipVerify: SkipSSLValidation()},
48-
}
46+
tr := http.DefaultTransport.(*http.Transport).Clone()
47+
tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: SkipSSLValidation()}
4948
req, err := http.NewRequest("GET", uaaUrl, nil)
5049
Expect(err).ToNot(HaveOccurred())
5150
req.Header.Add("Accept", "application/json")

0 commit comments

Comments
 (0)