Skip to content

Commit

Permalink
test: fix ginkgo E2E crash (#2173)
Browse files Browse the repository at this point in the history
* test: fix ginkgo E2E crash
* test: update SSL test
* test: re add plugin_config bad query case
  • Loading branch information
bzp2010 authored Oct 15, 2021
1 parent 69bce2c commit 5065c65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backend-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- name: setup go
uses: actions/[email protected]
with:
go-version: "1.13"
go-version: "1.17"

- uses: docker/setup-buildx-action@v1

Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
docker logs docker_managerapi_1
- name: install ginkgo cli
run: go get github.com/onsi/ginkgo/ginkgo
run: go install github.com/onsi/ginkgo/ginkgo@v1.16.5

- name: run test
working-directory: ./api/test/e2enew
Expand Down
4 changes: 2 additions & 2 deletions api/test/e2enew/plugin_config/plugin_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ var _ = ginkgo.Describe("Plugin Config", func() {
Object: base.APISIXExpect(),
Method: http.MethodGet,
Path: "/hello",
Query: "name=;select%20from%20sys",
Query: "name=%3Bselect%20from%20sys",
ExpectStatus: http.StatusForbidden,
ExpectHeaders: map[string]string{"X-VERSION": "1.0"},
Sleep: base.SleepTime,
Expand Down Expand Up @@ -181,7 +181,7 @@ var _ = ginkgo.Describe("Plugin Config", func() {
Object: base.APISIXExpect(),
Method: http.MethodGet,
Path: "/hello",
Query: "name=;select%20from%20sys",
Query: "name=%3Bselect%20from%20sys",
ExpectStatus: http.StatusOK,
ExpectBody: "hello world",
ExpectHeaders: map[string]string{"X-VERSION": "2.0"},
Expand Down
4 changes: 2 additions & 2 deletions api/test/e2enew/ssl/ssl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ var _ = ginkgo.Describe("SSL Basic", func() {
}

_, err := http.Get("https://www.test2.com:9443")
gomega.Expect(fmt.Sprintf("%s", err)).Should(gomega.Equal("Get https://www.test2.com:9443: remote error: tls: internal error"))
gomega.Expect(fmt.Sprintf("%s", err)).Should(gomega.Equal("Get \"https://www.test2.com:9443\": remote error: tls: internal error"))
})

table.DescribeTable("test ssl basic", func(testCase base.HttpTestCase) {
Expand Down Expand Up @@ -240,7 +240,7 @@ var _ = ginkgo.Describe("SSL Basic", func() {
// try again after disable SSL, make a HTTPS request
time.Sleep(time.Duration(500) * time.Millisecond)
_, err := http.Get("https://www.test2.com:9443")
gomega.Expect(fmt.Sprintf("%s", err)).Should(gomega.Equal("Get https://www.test2.com:9443: remote error: tls: internal error"))
gomega.Expect(fmt.Sprintf("%s", err)).Should(gomega.Equal("Get \"https://www.test2.com:9443\": remote error: tls: internal error"))
})

table.DescribeTable("test ssl basic", func(testCase base.HttpTestCase) {
Expand Down

0 comments on commit 5065c65

Please sign in to comment.