gxthrj commented on a change in pull request #203:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/203#discussion_r569985936



##########
File path: test/e2e/scaffold/apisix.go
##########
@@ -139,6 +146,25 @@ func (s *Scaffold) apisixServiceURL() (string, error) {
        return "", errors.New("no http port in apisix service")
 }
 
+func (s *Scaffold) apisixServiceHttpsURL() (string, error) {
+       if len(s.nodes) == 0 {
+               return "", errors.New("no available node")
+       }
+       var addr string
+       for _, node := range s.nodes {
+               if len(node.Status.Addresses) > 0 {
+                       addr = node.Status.Addresses[0].Address
+                       break
+               }
+       }
+       for _, port := range s.apisixService.Spec.Ports {
+               if port.Name == "https" {
+                       return net.JoinHostPort(addr, 
strconv.Itoa(int(port.NodePort))), nil
+               }
+       }
+       return "", errors.New("no http port in apisix service")

Review comment:
       Done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to