Skip to content

Commit

Permalink
fix: add test log (#2048)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 19, 2024
1 parent d4fef76 commit a5a9f8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api/controller/apigateway/api_gateway_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,19 +202,17 @@ func (g Struct) CreateHTTPAPIRoute(w http.ResponseWriter, r *http.Request) {
routeName = strings.ReplaceAll(routeName, "*", "s-s")

for _, host := range apisixRouteHTTP.Match.Hosts {
logrus.Infof("-------------%v---------------", host)
labels[host] = "host"
labelSelector := host + "=host"
roueList, err := c.ApisixRoutes(tenant.Namespace).List(r.Context(), v1.ListOptions{
LabelSelector: labelSelector,
})
logrus.Infof("---------------%v-------------", labelSelector)
logrus.Infof("---------------%v-------------", roueList)
if err != nil {
logrus.Errorf("list check route failure: %v", err)
httputil.ReturnBcodeError(r, w, bcode.ErrRouteNotFound)
return
}
logrus.Infof("?????????????????%v, -------%v,,,,,,,,,%v", len(roueList.Items), roueList.Items[0].Name, routeName)
if roueList != nil && len(roueList.Items) > 0 && roueList.Items[0].Name != routeName {
logrus.Errorf("list check route failure: %v", err)
httputil.ReturnBcodeError(r, w, bcode.ErrRouteExist)
Expand Down

0 comments on commit a5a9f8f

Please sign in to comment.