Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
- etcd
ports:
- "9080:9080/tcp"
- "9180:9180/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/plugins/plugins_post_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var _ = ginkgo.Describe("Post", func() {
tools.RunTestCase(tc)
},
table.Entry("create java runner post plugin route success", tools.HttpTestCase{
Object: tools.GetA6Expect(),
Object: tools.PutA6Conf(),
Method: http.MethodPut,
Path: "/apisix/admin/routes/1",
Body: `{
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/plugins/plugins_rewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var _ = ginkgo.Describe("Stop", func() {
tools.RunTestCase(tc)
},
table.Entry("create java runner stop plugin route success", tools.HttpTestCase{
Object: tools.GetA6Expect(),
Object: tools.PutA6Conf(),
Method: http.MethodPut,
Path: "/apisix/admin/routes/1",
Body: `{
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/plugins/plugins_stop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var _ = ginkgo.Describe("Stop", func() {
tools.RunTestCase(tc)
},
table.Entry("create java runner stop plugin route success", tools.HttpTestCase{
Object: tools.GetA6Expect(),
Object: tools.PutA6Conf(),
Method: http.MethodPut,
Path: "/apisix/admin/routes/1",
Body: `{
Expand Down
12 changes: 9 additions & 3 deletions tests/e2e/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@ import (
)

var (
token = "edd1c9f034335f136f87ad84b625c8f1"
A6Host = "http://127.0.0.1:9080"
token = "edd1c9f034335f136f87ad84b625c8f1"
A6_CP_Host = "http://127.0.0.1:9180"
A6_DP_Host = "http://127.0.0.1:9080"
)

func GetAdminToken() string {
return token
}

func PutA6Conf() *httpexpect.Expect {
t := ginkgo.GinkgoT()
return httpexpect.New(t, A6_CP_Host)
}

func GetA6Expect() *httpexpect.Expect {
t := ginkgo.GinkgoT()
return httpexpect.New(t, A6Host)
return httpexpect.New(t, A6_DP_Host)
}

type HttpTestCase struct {
Expand Down