@@ -33,6 +33,7 @@ import (
33
33
"code.cloudfoundry.org/lager/lagertest"
34
34
"code.cloudfoundry.org/localip"
35
35
"code.cloudfoundry.org/rep/cmd/rep/config"
36
+ "golang.org/x/net/http2"
36
37
37
38
"crypto/tls"
38
39
"crypto/x509"
@@ -50,7 +51,7 @@ import (
50
51
51
52
const GraceBusyboxImageURL = "docker:///cfdiegodocker/grace"
52
53
53
- var _ = Describe ("InstanceIdentity" , func () {
54
+ var _ = FDescribe ("InstanceIdentity" , func () {
54
55
var (
55
56
validityPeriod time.Duration
56
57
cellProcess ifrit.Process
@@ -97,7 +98,7 @@ var _ = Describe("InstanceIdentity", func() {
97
98
}
98
99
99
100
client = http.Client {}
100
- client .Transport = & http .Transport {
101
+ client .Transport = & http2 .Transport {
101
102
TLSClientConfig : & tls.Config {
102
103
InsecureSkipVerify : false ,
103
104
RootCAs : rootCAs ,
@@ -333,7 +334,7 @@ var _ = Describe("InstanceIdentity", func() {
333
334
if runtime .GOOS == "windows" {
334
335
Skip ("unable to find the equivalant command in windows even after using curl.exe (see https://github.com/curl/curl/issues/2262)" )
335
336
}
336
- output = runTaskAndGetCommandOutput (fmt .Sprintf ("curl --silent -k --cert /etc/cf-instance-credentials/instance.crt --key /etc/cf-instance-credentials/instance.key https://%s" , url ), []string {})
337
+ output = runTaskAndGetCommandOutput (fmt .Sprintf ("curl --http2 -- silent -k --cert /etc/cf-instance-credentials/instance.crt --key /etc/cf-instance-credentials/instance.key https://%s" , url ), []string {})
337
338
})
338
339
339
340
It ("successfully connects" , func () {
@@ -438,7 +439,7 @@ var _ = Describe("InstanceIdentity", func() {
438
439
439
440
Context ("when an invalid cipher is used" , func () {
440
441
BeforeEach (func () {
441
- client .Transport = & http .Transport {
442
+ client .Transport = & http2 .Transport {
442
443
TLSClientConfig : & tls.Config {
443
444
InsecureSkipVerify : false ,
444
445
RootCAs : rootCAs ,
@@ -453,10 +454,25 @@ var _ = Describe("InstanceIdentity", func() {
453
454
})
454
455
})
455
456
456
- It ("should have a container with envoy enabled on it" , func () {
457
+ FIt ("should have a container with envoy enabled on it" , func () {
457
458
Eventually (connect , 10 * time .Second ).Should (Succeed ())
458
459
})
459
460
461
+ FContext ("If I'm HTTP/1.1" , func () {
462
+ BeforeEach (func () {
463
+ client .Transport = & http.Transport {
464
+ TLSClientConfig : & tls.Config {
465
+ InsecureSkipVerify : false ,
466
+ RootCAs : rootCAs ,
467
+ },
468
+ }
469
+ })
470
+
471
+ FIt ("should have a container with envoy enabled on it" , func () {
472
+ Eventually (connect , 10 * time .Second ).Should (Succeed ())
473
+ })
474
+ })
475
+
460
476
Context ("when rep is configured for mutual tls" , func () {
461
477
var (
462
478
caCertContent []byte
@@ -476,7 +492,7 @@ var _ = Describe("InstanceIdentity", func() {
476
492
tlsCert , err := tls .LoadX509KeyPair (string (serverCert ), string (serverKey ))
477
493
Expect (err ).NotTo (HaveOccurred ())
478
494
479
- client .Transport = & http .Transport {
495
+ client .Transport = & http2 .Transport {
480
496
TLSClientConfig : & tls.Config {
481
497
InsecureSkipVerify : false ,
482
498
RootCAs : rootCAs ,
@@ -570,7 +586,7 @@ var _ = Describe("InstanceIdentity", func() {
570
586
wrongTlsCert , err := tls .LoadX509KeyPair (string (wrongServerCert ), string (wrongServerKey ))
571
587
Expect (err ).NotTo (HaveOccurred ())
572
588
573
- client .Transport = & http .Transport {
589
+ client .Transport = & http2 .Transport {
574
590
TLSClientConfig : & tls.Config {
575
591
InsecureSkipVerify : false ,
576
592
RootCAs : rootCAs ,
0 commit comments