This is an automated email from the ASF dual-hosted git repository.
wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 38a71a7 fix: fix router name conflict in
route_service_upstream_test.go.
38a71a7 is described below
commit 38a71a73555d14dea4e8713f4b316e161ee0b806
Author: nic-chen <[email protected]>
AuthorDate: Thu Dec 10 11:40:26 2020 +0800
fix: fix router name conflict in route_service_upstream_test.go.
---
api/test/e2e/route_service_upstream_test.go | 20 ++++++++++++++++++--
api/test/e2e/route_with_limit_plugin_test.go | 2 +-
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/api/test/e2e/route_service_upstream_test.go
b/api/test/e2e/route_service_upstream_test.go
index c74eb1e..d29964f 100644
--- a/api/test/e2e/route_service_upstream_test.go
+++ b/api/test/e2e/route_service_upstream_test.go
@@ -126,6 +126,14 @@ func TestRoute_Invalid_Service_And_Service(t *testing.T) {
func TestRoute_Create_Service(t *testing.T) {
tests := []HttpTestCase{
{
+ caseDesc: "make sure the route has not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/server_port",
+ ExpectStatus: http.StatusNotFound,
+ Sleep: sleepTime,
+ },
+ {
caseDesc: "create service",
Object: ManagerApiExpect(t),
Method: http.MethodPut,
@@ -159,7 +167,7 @@ func TestRoute_Create_Service(t *testing.T) {
caseDesc: "create route using the service just created",
Object: ManagerApiExpect(t),
Method: http.MethodPut,
- Path: "/apisix/admin/routes/r2",
+ Path: "/apisix/admin/routes/r1",
Body: `{
"uri": "/server_port",
"service_id": "200"
@@ -190,7 +198,7 @@ func TestRoute_Delete_Service(t *testing.T) {
caseDesc: "delete route",
Object: ManagerApiExpect(t),
Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r2",
+ Path: "/apisix/admin/routes/r1",
Headers: map[string]string{"Authorization": token},
ExpectStatus: http.StatusOK,
},
@@ -246,6 +254,14 @@ func TestRoute_Create_Upstream(t *testing.T) {
ExpectStatus: http.StatusOK,
},
{
+ caseDesc: "make sure the route has not created",
+ Object: APISIXExpect(t),
+ Method: http.MethodGet,
+ Path: "/server_port",
+ ExpectStatus: http.StatusNotFound,
+ Sleep: sleepTime,
+ },
+ {
caseDesc: "create route using the upstream just
created",
Object: ManagerApiExpect(t),
Method: http.MethodPut,
diff --git a/api/test/e2e/route_with_limit_plugin_test.go
b/api/test/e2e/route_with_limit_plugin_test.go
index 39f0fb7..58bd57d 100644
--- a/api/test/e2e/route_with_limit_plugin_test.go
+++ b/api/test/e2e/route_with_limit_plugin_test.go
@@ -92,7 +92,7 @@ func TestRoute_With_Limit_Plugin(t *testing.T) {
Path: "/hello",
ExpectStatus: http.StatusOK,
ExpectBody: "hello world",
- Sleep: 2 * time.Second,
+ Sleep: 3 * time.Second,
},
{
caseDesc: "delete route",