You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by bz...@apache.org on 2022/12/16 06:38:25 UTC

[apisix-dashboard] branch feat-change-etcd-prefix created (now a719657da)

This is an automated email from the ASF dual-hosted git repository.

bzp2010 pushed a change to branch feat-change-etcd-prefix
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


      at a719657da fix: move admin api to spearate port

This branch includes the following new commits:

     new a719657da fix: move admin api to spearate port

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[apisix-dashboard] 01/01: fix: move admin api to spearate port

Posted by bz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bzp2010 pushed a commit to branch feat-change-etcd-prefix
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git

commit a719657da16c7afdfaf93075242a4446fe5ba124
Author: Zeping Bai <bz...@apache.org>
AuthorDate: Fri Dec 16 14:38:14 2022 +0800

    fix: move admin api to spearate port
---
 api/test/e2e/base/base.go                         | 6 ++++++
 api/test/e2e/id_compatible/id_crossing_test.go    | 4 ++--
 api/test/e2e/id_compatible/id_not_in_body_test.go | 4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/api/test/e2e/base/base.go b/api/test/e2e/base/base.go
index a3aa943bc..8a32bb5ac 100644
--- a/api/test/e2e/base/base.go
+++ b/api/test/e2e/base/base.go
@@ -40,6 +40,7 @@ var (
 	UpstreamIp             = "172.16.238.20"
 	UpstreamGrpcIp         = "172.16.238.21"
 	APISIXHost             = "http://127.0.0.1:9080"
+	APISIXAdminAPIHost     = "http://127.0.0.1:9180"
 	APISIXInternalUrl      = "http://172.16.238.30:9080"
 	APISIXSingleWorkerHost = "http://127.0.0.1:9081"
 	ManagerAPIHost         = "http://127.0.0.1:9000"
@@ -82,6 +83,11 @@ func APISIXExpect() *httpexpect.Expect {
 	return httpexpect.New(t, APISIXHost)
 }
 
+func APISIXAdminAPIExpect() *httpexpect.Expect {
+	t := getTestingHandle()
+	return httpexpect.New(t, APISIXAdminAPIHost)
+}
+
 func APISIXStreamProxyExpect(port uint16, sni string) *httpexpect.Expect {
 	if port == 0 {
 		port = 10090
diff --git a/api/test/e2e/id_compatible/id_crossing_test.go b/api/test/e2e/id_compatible/id_crossing_test.go
index b768dafb3..4d1d28c5b 100644
--- a/api/test/e2e/id_compatible/id_crossing_test.go
+++ b/api/test/e2e/id_compatible/id_crossing_test.go
@@ -29,7 +29,7 @@ var _ = DescribeTable("Id Crossing",
 		base.RunTestCase(tc)
 	},
 	Entry("create upstream by admin api", base.HttpTestCase{
-		Object: base.APISIXExpect(),
+		Object: base.APISIXAdminAPIExpect(),
 		Method: http.MethodPut,
 		Path:   "/apisix/admin/upstreams",
 		Body: `{
@@ -45,7 +45,7 @@ var _ = DescribeTable("Id Crossing",
 		ExpectStatus: http.StatusCreated,
 	}),
 	Entry("create route by admin api", base.HttpTestCase{
-		Object: base.APISIXExpect(),
+		Object: base.APISIXAdminAPIExpect(),
 		Method: http.MethodPut,
 		Path:   "/apisix/admin/routes/3",
 		Body: `{
diff --git a/api/test/e2e/id_compatible/id_not_in_body_test.go b/api/test/e2e/id_compatible/id_not_in_body_test.go
index 1e155d8fe..183268ff1 100644
--- a/api/test/e2e/id_compatible/id_not_in_body_test.go
+++ b/api/test/e2e/id_compatible/id_not_in_body_test.go
@@ -43,7 +43,7 @@ var _ = DescribeTable("Id Not In Body",
 	}),
 	Entry("create route that has no ID in request body by admin api", func() {
 		base.RunTestCase(base.HttpTestCase{
-			Object: base.APISIXExpect(),
+			Object: base.APISIXAdminAPIExpect(),
 			Method: http.MethodPut,
 			Path:   "/apisix/admin/routes/r1",
 			Body: `{
@@ -102,7 +102,7 @@ var _ = DescribeTable("Id Not In Body",
 	}),
 	Entry("create route that has no ID in request body by admin api (POST)", func() {
 		base.RunTestCase(base.HttpTestCase{
-			Object: base.APISIXExpect(),
+			Object: base.APISIXAdminAPIExpect(),
 			Method: http.MethodPost,
 			Path:   "/apisix/admin/routes",
 			Body: `{