Skip to content

Commit e392476

Browse files
committed
adding proxy for tests
Signed-off-by: Daniel Buchanan <dbuchana@redhat.com>
1 parent 62cb738 commit e392476

4 files changed

Lines changed: 6 additions & 0 deletions

File tree

tests/pkg/tests/observability_alert_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ var _ = Describe("", func() {
415415

416416
client := &http.Client{
417417
Transport: &http.Transport{
418+
Proxy: http.ProxyFromEnvironment,
418419
TLSClientConfig: &tls.Config{RootCAs: pool},
419420
},
420421
}
@@ -566,6 +567,7 @@ var _ = Describe("", func() {
566567

567568
client := &http.Client{
568569
Transport: &http.Transport{
570+
Proxy: http.ProxyFromEnvironment,
569571
TLSClientConfig: &tls.Config{RootCAs: pool},
570572
},
571573
}

tests/pkg/tests/observability_route_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ var _ = Describe("", func() {
6969
pool := x509.NewCertPool()
7070
pool.AppendCertsFromPEM(caCrt)
7171
tr := &http.Transport{
72+
Proxy: http.ProxyFromEnvironment,
7273
TLSClientConfig: &tls.Config{RootCAs: pool},
7374
}
7475

@@ -153,6 +154,7 @@ var _ = Describe("", func() {
153154
pool := x509.NewCertPool()
154155
pool.AppendCertsFromPEM(caCrt)
155156
tr := &http.Transport{
157+
Proxy: http.ProxyFromEnvironment,
156158
TLSClientConfig: &tls.Config{RootCAs: pool},
157159
}
158160

tests/pkg/utils/mco_dashboard.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func ContainDashboard(opt TestOptions, title string) (error, bool) {
3636
client := &http.Client{}
3737
if os.Getenv("IS_KIND_ENV") != trueStr {
3838
tr := &http.Transport{
39+
Proxy: http.ProxyFromEnvironment,
3940
// #nosec G402 -- Used in test.
4041
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
4142
}

tests/pkg/utils/mco_metric.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func QueryGrafana(opt TestOptions, query string) (*GrafanaResponse, error) {
8989
client := &http.Client{}
9090
if os.Getenv("IS_KIND_ENV") != "true" {
9191
tr := &http.Transport{
92+
Proxy: http.ProxyFromEnvironment,
9293
// #nosec G402 -- Only used in test.
9394
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
9495
}

0 commit comments

Comments
 (0)