Skip to content

Commit 522db2e

Browse files
authored
Merge pull request #1132 from devigned/elb
reenable direct connect to elb
2 parents dd0d7ac + 137d145 commit 522db2e

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ require (
1717
github.com/google/go-cmp v0.5.3
1818
github.com/google/gofuzz v1.2.0
1919
github.com/google/uuid v1.1.2
20+
github.com/hashicorp/go-retryablehttp v0.6.8
2021
github.com/onsi/ginkgo v1.14.2
2122
github.com/onsi/gomega v1.10.3
2223
github.com/pkg/errors v0.9.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,13 @@ github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyN
435435
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
436436
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
437437
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
438+
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
439+
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
438440
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
439441
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
440442
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
443+
github.com/hashicorp/go-retryablehttp v0.6.8 h1:92lWxgpa+fF3FozM4B3UZtHZMJX8T5XT+TFdCxsPyWs=
444+
github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
441445
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
442446
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
443447
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=

test/e2e/azure_lb.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
. "github.com/onsi/gomega"
2828
k8snet "k8s.io/utils/net"
2929

30+
"github.com/hashicorp/go-retryablehttp"
3031
corev1 "k8s.io/api/core/v1"
3132
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3233
"k8s.io/client-go/kubernetes"
@@ -182,17 +183,17 @@ func AzureLBSpec(ctx context.Context, inputGetter func() AzureLBSpecInput) {
182183
// TODO: determine root issue of failures of addressing the ELB from prow and fix
183184
// see https://kubernetes.slack.com/archives/CEX9HENG7/p1610547551019900
184185

185-
//if !input.IPv6 {
186-
// By("connecting directly to the external LB service")
187-
// url := fmt.Sprintf("http://%s", elbIP)
188-
// resp, err := retryablehttp.Get(url)
189-
// if resp != nil {
190-
// defer resp.Body.Close()
191-
// }
192-
// Expect(err).NotTo(HaveOccurred())
193-
// Expect(resp.StatusCode).To(Equal(200))
194-
// Expect(err).NotTo(HaveOccurred())
195-
//}
186+
if !input.IPv6 {
187+
By("connecting directly to the external LB service")
188+
url := fmt.Sprintf("http://%s", elbIP)
189+
resp, err := retryablehttp.Get(url)
190+
if resp != nil {
191+
defer resp.Body.Close()
192+
}
193+
Expect(err).NotTo(HaveOccurred())
194+
Expect(resp.StatusCode).To(Equal(200))
195+
Expect(err).NotTo(HaveOccurred())
196+
}
196197

197198
if input.SkipCleanup {
198199
return

0 commit comments

Comments
 (0)