idbeta opened a new issue #2878:
URL: https://github.com/apache/apisix/issues/2878


   ### Issue description
   create with vars which operator was wrong, but APISIX still returns 200 and 
insert to etcd.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): master
   * OS:
   
   ### Minimal test code / Steps to reproduce the issue
   ```
   {
                        caseDesc: "add route with invalid vars (error 
operators)",
                        Object:   MangerApiExpect(t),
                        Method:   http.MethodPut,
                        Path:     "/apisix/admin/routes/r1",
                        Body: `{
                                        "uri": "/hello",
                                        "vars": [
                                                ["arg_name","=","aaa"]
                                        ],
                                        "upstream": {
                                                "type": "roundrobin",
                                                "nodes": [{
                                                        "host": "172.16.238.20",
                                                        "port": 1980,
                                                        "weight": 1
                                                }]
                                        }
                                }`,
                        Headers:      map[string]string{"Authorization": token},
                        ExpectStatus: http.StatusNotFound,
                },
   ```
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   return 200, and insert the route to etcd, but it is useless.
   
   ### What's the expected result?
   return 400


----------------------------------------------------------------
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