starsz commented on issue #1658:
URL: 
https://github.com/apache/apisix-dashboard/issues/1658#issuecomment-804926818


   When we create a route, we should test whether it works well in DP.
   The same as service, consumer, upstream...
   
   For example:
   ```
   ginkgo.It("create route using the service just created", func() {
                base.RunTestCase(base.HttpTestCase{
                        Object: base.ManagerApiExpect(),
                        Method: http.MethodPut,
                        Path:   "/apisix/admin/routes/r1",
                        Body: `{
                                "uri": "/hello",
                                "service_id": "s2"
                        }`,
                        Headers:      map[string]string{"Authorization": 
base.GetToken()},
                        ExpectStatus: http.StatusOK,
                        Sleep:        base.SleepTime,
                })
        })
        ginkgo.It("verify route", func() {
                base.RunTestCase(base.HttpTestCase{
                        Object:       base.APISIXExpect(),
                        Method:       http.MethodGet,
                        Path:         "/hello",
                        ExpectStatus: http.StatusOK,
                        ExpectBody:   "hello world",
                        Sleep:        base.SleepTime,
                })
        })
   
   ```
   
   The test `verify route` is very important, so that we can test the route can 
work well in the data plane(apisix) 
   
   
   


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