You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/06 11:26:43 UTC

[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #401: feat: tcp route translation

tokers commented on a change in pull request #401:
URL: https://github.com/apache/apisix-ingress-controller/pull/401#discussion_r627333831



##########
File path: test/e2e/scaffold/k8s.go
##########
@@ -213,6 +224,26 @@ func (s *Scaffold) ListApisixRoutes() ([]*v1.Route, error) {
 	return cli.Cluster("").Route().List(context.TODO())
 }
 
+// ListApisixStreamRoutes list all stream_routes from APISIX.
+func (s *Scaffold) ListApisixStreamRoutes() ([]*v1.StreamRoute, error) {
+	u := url.URL{
+		Scheme: "http",
+		Host:   s.apisixAdminTunnel.Endpoint(),
+		Path:   "/apisix/admin",
+	}
+	cli, err := apisix.NewClient()
+	if err != nil {
+		return nil, err
+	}
+	err = cli.AddCluster(&apisix.ClusterOptions{
+		BaseURL: u.String(),
+	})
+	if err != nil {
+		return nil, err
+	}
+	return cli.Cluster("").StreamRoute().List(context.TODO())

Review comment:
       Got it.




-- 
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:
users@infra.apache.org