File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -548,20 +548,15 @@ func assertTLSError(cluster *rabbitmqv1beta1.RabbitmqCluster) {
548
548
}
549
549
550
550
func assertHttpReady (hostname , port string ) {
551
- EventuallyWithOffset (1 , func () int {
551
+ EventuallyWithOffset (1 , func () ( * http. Response , error ) {
552
552
client := & http.Client {Timeout : 10 * time .Second }
553
- url := fmt .Sprintf ("http://%s:%s" , hostname , port )
553
+ rabbitURL := fmt .Sprintf ("http://%s:%s" , hostname , port )
554
554
555
- req , _ := http .NewRequest (http .MethodGet , url , nil )
555
+ req , err := http .NewRequest (http .MethodGet , rabbitURL , nil )
556
+ Expect (err ).ToNot (HaveOccurred ())
556
557
557
- resp , err := client .Do (req )
558
- if err != nil {
559
- return 0
560
- }
561
- defer resp .Body .Close ()
562
-
563
- return resp .StatusCode
564
- }, podCreationTimeout , 5 ).Should (Equal (http .StatusOK ))
558
+ return client .Do (req )
559
+ }, podCreationTimeout , 5 ).Should (HaveHTTPStatus (http .StatusOK ))
565
560
}
566
561
567
562
func createTLSSecret (secretName , secretNamespace , hostname string ) string {
You can’t perform that action at this time.
0 commit comments