test: remove stale E2E cases (#2475)
diff --git a/.github/workflows/backend-e2e-test.yml b/.github/workflows/backend-e2e-test.yml
index a0977e3..eb8c02d 100644
--- a/.github/workflows/backend-e2e-test.yml
+++ b/.github/workflows/backend-e2e-test.yml
@@ -26,97 +26,6 @@
- name: setup go
uses: actions/setup-go@v3
with:
- go-version: "1.15"
- submodules: recursive
-
- - uses: actions/cache@v2
- with:
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
-
- - uses: docker/setup-buildx-action@v1
-
- - uses: actions/cache@v2
- with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-apisixdashboard-
- ${{ runner.os }}-buildx-
-
- - name: Modify conf.yaml
- run: |
- sed -i 's/127.0.0.1:2379/172.16.238.10:2379/' ./api/conf/conf.yaml
- sed -i 's@127.0.0.1@0.0.0.0/0@' ./api/conf/conf.yaml
- sed -i '/172.16.238.10:2379/a\ - 172.16.238.11:2379' ./api/conf/conf.yaml
- sed -i '/172.16.238.10:2379/a\ - 172.16.238.12:2379' ./api/conf/conf.yaml
- sed -i 's@# - dubbo-proxy@- dubbo-proxy@' ./api/conf/conf.yaml
-
- - name: download file Dockerfile-apisix
- working-directory: ./api/test/docker
- run: |
- curl -o Dockerfile-apisix https://raw.githubusercontent.com/apache/apisix-docker/master/alpine/Dockerfile
-
- - name: build docker images
- working-directory: ./api/test/docker
- continue-on-error: true
- run: |
- docker buildx bake --load \
- -f docker-compose.yaml \
- --set *.cache-from=type=local,src=/tmp/.buildx-cache \
- --set *.cache-to=type=local,dest=/tmp/.buildx-cache
-
- - name: build and start grpc_server_example
- working-directory: ./api/test/docker
- run: |
- wget https://github.com/api7/grpc_server_example/archive/refs/tags/20210819.tar.gz
- tar -xzvf 20210819.tar.gz && cd grpc_server_example-20210819
- docker build -t grpc_server_example:latest .
-
- - name: run docker compose
- working-directory: ./api/test/docker
- run: |
- docker-compose up -d
-
- # wait for services ready
- ../shell/wait_for_services.sh
-
- docker logs docker_managerapi_1
- docker logs docker_apisix_1
-
- - name: run test
- working-directory: ./api/test/e2e
- run: go test -v
-
- - name: stop docker compose
- working-directory: ./api/test/docker
- run: |
- docker-compose down
- sleep 10
-
- - name: output test coverage
- working-directory: ./api/test/testdata
- run: |
- go tool cover -func=./integrationcover.out
-
- - name: upload coverage profile
- working-directory: ./api/test/testdata
- run: |
- bash <(curl -s https://codecov.io/bash) -f ./integrationcover.out -F backend-e2e-test
-
- backend-e2e-test-ginkgo:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - name: setup go
- uses: actions/setup-go@v3
- with:
go-version: "1.17"
- uses: docker/setup-buildx-action@v1
@@ -168,7 +77,7 @@
run: go install github.com/onsi/ginkgo/ginkgo@v1.16.5
- name: run test
- working-directory: ./api/test/e2enew
+ working-directory: ./api/test/e2e
run: ginkgo -r
- name: stop docker compose
diff --git a/api/internal/handler/data_loader/route_import_test.go b/api/internal/handler/data_loader/route_import_test.go
index 81cbad8..437bce3 100644
--- a/api/internal/handler/data_loader/route_import_test.go
+++ b/api/internal/handler/data_loader/route_import_test.go
@@ -19,7 +19,6 @@
import (
"bytes"
"errors"
- "github.com/shiningrush/droplet/data"
"io/ioutil"
"mime/multipart"
"net/http"
@@ -29,6 +28,8 @@
"strings"
"testing"
+ "github.com/shiningrush/droplet/data"
+
"github.com/shiningrush/droplet"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
@@ -98,7 +99,7 @@
if runtime.GOOS == "windows" {
bound = `\api\`
}
- apiDir := filepath.Join(strings.Split(pwd,bound)[0], bound)
+ apiDir := filepath.Join(strings.Split(pwd, bound)[0], bound)
fileContent, err := ioutil.ReadFile(filepath.Join(apiDir, filePath))
assert.Nil(t, err)
diff --git a/api/test/e2enew/auth/auth_suite_test.go b/api/test/e2e/auth/auth_suite_test.go
similarity index 100%
rename from api/test/e2enew/auth/auth_suite_test.go
rename to api/test/e2e/auth/auth_suite_test.go
diff --git a/api/test/e2enew/auth/authentication_test.go b/api/test/e2e/auth/authentication_test.go
similarity index 97%
rename from api/test/e2enew/auth/authentication_test.go
rename to api/test/e2e/auth/authentication_test.go
index 54e5c34..3a41f17 100644
--- a/api/test/e2enew/auth/authentication_test.go
+++ b/api/test/e2e/auth/authentication_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Authentication", func() {
diff --git a/api/test/e2enew/balancer/balancer_suite_test.go b/api/test/e2e/balancer/balancer_suite_test.go
similarity index 95%
rename from api/test/e2enew/balancer/balancer_suite_test.go
rename to api/test/e2e/balancer/balancer_suite_test.go
index 5f700ac..91cfab1 100644
--- a/api/test/e2enew/balancer/balancer_suite_test.go
+++ b/api/test/e2e/balancer/balancer_suite_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestAuth(t *testing.T) {
diff --git a/api/test/e2enew/balancer/balancer_test.go b/api/test/e2e/balancer/balancer_test.go
similarity index 98%
rename from api/test/e2enew/balancer/balancer_test.go
rename to api/test/e2e/balancer/balancer_test.go
index 1e211b8..9ad3ed1 100644
--- a/api/test/e2enew/balancer/balancer_test.go
+++ b/api/test/e2e/balancer/balancer_test.go
@@ -24,7 +24,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/stretchr/testify/assert"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Balancer", func() {
diff --git a/api/test/e2e/base.go b/api/test/e2e/base.go
deleted file mode 100644
index 822212a..0000000
--- a/api/test/e2e/base.go
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package e2e
-
-import (
- "bytes"
- "context"
- "crypto/tls"
- "fmt"
- "io/ioutil"
- "net"
- "net/http"
- "os/exec"
- "reflect"
- "strings"
- "testing"
- "time"
-
- "github.com/gavv/httpexpect/v2"
- "github.com/stretchr/testify/assert"
- "github.com/tidwall/gjson"
-)
-
-var (
- token string
- Token string
-
- UpstreamIp = "172.16.238.20"
- APISIXHost = "http://127.0.0.1:9080"
- APISIXInternalUrl = "http://172.16.238.30:9080"
- APISIXSingleWorkerHost = "http://127.0.0.1:9081"
- ManagerAPIHost = "http://127.0.0.1:9000"
-)
-
-func init() {
- //login to get auth token
- requestBody := []byte(`{
- "username": "admin",
- "password": "admin"
- }`)
-
- url := ManagerAPIHost + "/apisix/admin/user/login"
- req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(requestBody))
- if err != nil {
- panic(err)
- }
- req.Header.Add("Content-Type", "application/json")
-
- client := &http.Client{}
- resp, err := client.Do(req)
- if err != nil {
- panic(err)
- }
-
- defer resp.Body.Close()
-
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- panic(err)
- }
-
- respond := gjson.ParseBytes(body)
- token = respond.Get("data.token").String()
- Token = token
-}
-
-func httpGet(url string, headers map[string]string) ([]byte, int, error) {
- req, err := http.NewRequest(http.MethodGet, url, nil)
- if err != nil {
- return nil, 0, err
- }
- for key, val := range headers {
- req.Header.Add(key, val)
- }
-
- client := &http.Client{}
- resp, err := client.Do(req)
- if err != nil {
- return nil, 0, err
- }
- defer resp.Body.Close()
-
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return nil, 0, err
- }
-
- return body, resp.StatusCode, nil
-}
-
-func ManagerApiExpect(t *testing.T) *httpexpect.Expect {
- return httpexpect.New(t, ManagerAPIHost)
-}
-
-func APISIXExpect(t *testing.T) *httpexpect.Expect {
- return httpexpect.New(t, APISIXHost)
-}
-
-func APISIXHTTPSExpect(t *testing.T) *httpexpect.Expect {
- e := httpexpect.WithConfig(httpexpect.Config{
- BaseURL: "https://www.test2.com:9443",
- Reporter: httpexpect.NewAssertReporter(t),
- Client: &http.Client{
- Transport: &http.Transport{
- TLSClientConfig: &tls.Config{
- // accept any certificate; for testing only!
- InsecureSkipVerify: true,
- },
- DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
- if addr == "www.test2.com:9443" {
- addr = "127.0.0.1:9443"
- }
- dialer := &net.Dialer{}
- return dialer.DialContext(ctx, network, addr)
- },
- },
- },
- })
-
- return e
-}
-
-func BatchTestServerPort(t *testing.T, times int) map[string]int {
- url := APISIXSingleWorkerHost + "/server_port"
- req, err := http.NewRequest(http.MethodGet, url, nil)
- assert.Nil(t, err)
-
- res := map[string]int{}
- var resp *http.Response
- var client *http.Client
- var body string
- var bodyByte []byte
-
- for i := 0; i < times; i++ {
- client = &http.Client{}
- resp, err = client.Do(req)
- assert.Nil(t, err)
-
- bodyByte, err = ioutil.ReadAll(resp.Body)
- assert.Nil(t, err)
- body = string(bodyByte)
-
- if _, ok := res[body]; !ok {
- res[body] = 1
- } else {
- res[body] += 1
- }
- }
-
- defer resp.Body.Close()
-
- return res
-}
-
-var sleepTime = time.Duration(300) * time.Millisecond
-
-type HttpTestCase struct {
- Desc string
- Object *httpexpect.Expect
- Method string
- Path string
- Query string
- Body string
- Headers map[string]string
- Headers_test map[string]interface{}
- ExpectStatus int
- ExpectCode int
- ExpectMessage string
- ExpectBody interface{}
- UnexpectBody interface{}
- ExpectHeaders map[string]string
- Sleep time.Duration //ms
-}
-
-func testCaseCheck(tc HttpTestCase, t *testing.T) {
- t.Run(tc.Desc, func(t *testing.T) {
- //init
- expectObj := tc.Object
- var req *httpexpect.Request
- switch tc.Method {
- case http.MethodGet:
- req = expectObj.GET(tc.Path)
- case http.MethodPut:
- req = expectObj.PUT(tc.Path)
- case http.MethodPost:
- req = expectObj.POST(tc.Path)
- case http.MethodDelete:
- req = expectObj.DELETE(tc.Path)
- case http.MethodPatch:
- req = expectObj.PATCH(tc.Path)
- case http.MethodOptions:
- req = expectObj.OPTIONS(tc.Path)
- default:
- }
-
- if req == nil {
- panic("fail to init request")
- }
-
- if tc.Sleep != 0 {
- time.Sleep(tc.Sleep)
- } else {
- time.Sleep(time.Duration(50) * time.Millisecond)
- }
-
- if tc.Query != "" {
- req.WithQueryString(tc.Query)
- }
-
- // set header
- setContentType := false
- for key, val := range tc.Headers {
- req.WithHeader(key, val)
- if strings.ToLower(key) == "content-type" {
- setContentType = true
- }
- }
-
- // set default content-type
- if !setContentType {
- req.WithHeader("Content-Type", "application/json")
- }
-
- // set body
- if tc.Body != "" {
- req.WithText(tc.Body)
- }
-
- // respond check
- resp := req.Expect()
-
- // match http status
- if tc.ExpectStatus != 0 {
- resp.Status(tc.ExpectStatus)
- }
-
- // match headers
- if tc.ExpectHeaders != nil {
- for key, val := range tc.ExpectHeaders {
- resp.Header(key).Equal(val)
- }
- }
-
- // match body
- if tc.ExpectBody != nil {
- assert.Contains(t, []string{"string", "[]string"}, reflect.TypeOf(tc.ExpectBody).String())
- if body, ok := tc.ExpectBody.(string); ok {
- if body == "" {
- // "" indicates the body is expected to be empty
- resp.Body().Empty()
- } else {
- resp.Body().Contains(body)
- }
- } else if bodies, ok := tc.ExpectBody.([]string); ok && len(bodies) != 0 {
- for _, b := range bodies {
- resp.Body().Contains(b)
- }
- }
- }
-
- // match UnexpectBody
- if tc.UnexpectBody != nil {
- assert.Contains(t, []string{"string", "[]string"}, reflect.TypeOf(tc.UnexpectBody).String())
- if body, ok := tc.UnexpectBody.(string); ok {
- // "" indicates the body is expected to be non empty
- if body == "" {
- resp.Body().NotEmpty()
- } else {
- resp.Body().NotContains(body)
- }
- } else if bodies, ok := tc.UnexpectBody.([]string); ok && len(bodies) != 0 {
- for _, b := range bodies {
- resp.Body().NotContains(b)
- }
- }
- }
- })
-}
-
-func RunTestCases(tc HttpTestCase, t *testing.T) {
- testCaseCheck(tc, t)
-}
-
-func ReadAPISIXErrorLog(t *testing.T) string {
- cmd := exec.Command("pwd")
- pwdByte, err := cmd.CombinedOutput()
- pwd := string(pwdByte)
- pwd = strings.Replace(pwd, "\n", "", 1)
- pwd = pwd[:strings.Index(pwd, "/e2e")]
- bytes, err := ioutil.ReadFile(pwd + "/docker/apisix_logs/error.log")
- assert.Nil(t, err)
- logContent := string(bytes)
-
- return logContent
-}
-
-func CleanAPISIXErrorLog(t *testing.T) {
- cmd := exec.Command("pwd")
- pwdByte, err := cmd.CombinedOutput()
- pwd := string(pwdByte)
- pwd = strings.Replace(pwd, "\n", "", 1)
- pwd = pwd[:strings.Index(pwd, "/e2e")]
- cmd = exec.Command("sudo", "echo", " > ", pwd+"/docker/apisix_logs/error.log")
- _, err = cmd.CombinedOutput()
- if err != nil {
- fmt.Println("cmd error:", err.Error())
- }
- assert.Nil(t, err)
-}
-
-// ReadAPISIXAccessLog reads the access log of APISIX.
-func ReadAPISIXAccessLog(t *testing.T) string {
- cmd := exec.Command("pwd")
- pwdByte, err := cmd.CombinedOutput()
- pwd := string(pwdByte)
- pwd = strings.Replace(pwd, "\n", "", 1)
- pwd = pwd[:strings.Index(pwd, "/e2e")]
- bytes, err := ioutil.ReadFile(pwd + "/docker/apisix_logs/access.log")
- assert.Nil(t, err)
- logContent := string(bytes)
-
- return logContent
-}
-
-// CleanAPISIXAccessLog cleans the access log of APISIX.
-// It's always recommended to call this function before checking
-// its content.
-func CleanAPISIXAccessLog(t *testing.T) {
- cmd := exec.Command("pwd")
- pwdByte, err := cmd.CombinedOutput()
- pwd := string(pwdByte)
- pwd = strings.Replace(pwd, "\n", "", 1)
- pwd = pwd[:strings.Index(pwd, "/e2e")]
- cmd = exec.Command("sudo", "echo", " > ", pwd+"/docker/apisix_logs/access.log")
- _, err = cmd.CombinedOutput()
- if err != nil {
- fmt.Println("cmd error:", err.Error())
- }
- assert.Nil(t, err)
-}
diff --git a/api/test/e2enew/base/base.go b/api/test/e2e/base/base.go
similarity index 100%
rename from api/test/e2enew/base/base.go
rename to api/test/e2e/base/base.go
diff --git a/api/test/e2enew/base/http.go b/api/test/e2e/base/http.go
similarity index 100%
rename from api/test/e2enew/base/http.go
rename to api/test/e2e/base/http.go
diff --git a/api/test/e2enew/consumer/consumer_suite_test.go b/api/test/e2e/consumer/consumer_suite_test.go
similarity index 95%
rename from api/test/e2enew/consumer/consumer_suite_test.go
rename to api/test/e2e/consumer/consumer_suite_test.go
index 48f125e..e2a414b 100644
--- a/api/test/e2enew/consumer/consumer_suite_test.go
+++ b/api/test/e2e/consumer/consumer_suite_test.go
@@ -23,7 +23,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestConsumer(t *testing.T) {
diff --git a/api/test/e2enew/consumer/consumer_test.go b/api/test/e2e/consumer/consumer_test.go
similarity index 98%
rename from api/test/e2enew/consumer/consumer_test.go
rename to api/test/e2e/consumer/consumer_test.go
index 0b25bcc..23db5c4 100644
--- a/api/test/e2enew/consumer/consumer_test.go
+++ b/api/test/e2e/consumer/consumer_test.go
@@ -22,7 +22,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = Describe("Consumer", func() {
diff --git a/api/test/e2enew/consumer/consumer_with_labels_test.go b/api/test/e2e/consumer/consumer_with_labels_test.go
similarity index 98%
rename from api/test/e2enew/consumer/consumer_with_labels_test.go
rename to api/test/e2e/consumer/consumer_with_labels_test.go
index 7b3d7c6..d116a41 100644
--- a/api/test/e2enew/consumer/consumer_with_labels_test.go
+++ b/api/test/e2e/consumer/consumer_with_labels_test.go
@@ -21,7 +21,7 @@
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = DescribeTable("Consumer With Labels",
diff --git a/api/test/e2enew/consumer/consumer_with_plugin_key_auth_test.go b/api/test/e2e/consumer/consumer_with_plugin_key_auth_test.go
similarity index 98%
rename from api/test/e2enew/consumer/consumer_with_plugin_key_auth_test.go
rename to api/test/e2e/consumer/consumer_with_plugin_key_auth_test.go
index 3ea10dc..d84db8b 100644
--- a/api/test/e2enew/consumer/consumer_with_plugin_key_auth_test.go
+++ b/api/test/e2e/consumer/consumer_with_plugin_key_auth_test.go
@@ -21,7 +21,7 @@
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = DescribeTable("Consumer With key-auth",
diff --git a/api/test/e2enew/global_rule/global_rule_suite_test.go b/api/test/e2e/global_rule/global_rule_suite_test.go
similarity index 95%
rename from api/test/e2enew/global_rule/global_rule_suite_test.go
rename to api/test/e2e/global_rule/global_rule_suite_test.go
index 5cf4ee8..455f2e7 100644
--- a/api/test/e2enew/global_rule/global_rule_suite_test.go
+++ b/api/test/e2e/global_rule/global_rule_suite_test.go
@@ -23,7 +23,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestGlobalRule(t *testing.T) {
diff --git a/api/test/e2enew/global_rule/global_rule_test.go b/api/test/e2e/global_rule/global_rule_test.go
similarity index 98%
rename from api/test/e2enew/global_rule/global_rule_test.go
rename to api/test/e2e/global_rule/global_rule_test.go
index 9459881..0536d89 100644
--- a/api/test/e2enew/global_rule/global_rule_test.go
+++ b/api/test/e2e/global_rule/global_rule_test.go
@@ -22,7 +22,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = Describe("Global Rule", func() {
diff --git a/api/test/e2e/go.mod b/api/test/e2e/go.mod
index 06e51b9..f02e25d 100644
--- a/api/test/e2e/go.mod
+++ b/api/test/e2e/go.mod
@@ -1,14 +1,11 @@
-module e2e
+module github.com/apisix/manager-api/test/e2e
go 1.15
require (
- github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/gavv/httpexpect/v2 v2.1.0
- github.com/golang/protobuf v1.3.3 // indirect
- github.com/mattn/go-isatty v0.0.12 // indirect
- github.com/stretchr/testify v1.4.0
- github.com/tidwall/gjson v1.6.1
- golang.org/x/text v0.3.2 // indirect
- gopkg.in/yaml.v2 v2.2.8 // indirect
+ github.com/gavv/httpexpect/v2 v2.3.1
+ github.com/onsi/ginkgo v1.16.5
+ github.com/onsi/gomega v1.16.0
+ github.com/stretchr/testify v1.7.0
+ github.com/tidwall/gjson v1.11.0
)
diff --git a/api/test/e2e/go.sum b/api/test/e2e/go.sum
index 6f0efec..b6d85c7 100644
--- a/api/test/e2e/go.sum
+++ b/api/test/e2e/go.sum
@@ -1,64 +1,88 @@
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
+github.com/andybalholm/brotli v1.0.2 h1:JKnhI/XQ75uFBTiuzXpzFrUriDPiZjlOSzh6wXogP0E=
+github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/fasthttp/websocket v1.4.2 h1:AU/zSiIIAuJjBMf5o+vO0syGOnEfvZRu40xIhW/3RuM=
-github.com/fasthttp/websocket v1.4.2/go.mod h1:smsv/h4PBEBaU0XDTY5UwJTpZv69fQ0FfcLJr21mA6Y=
+github.com/fasthttp/websocket v1.4.3-rc.6 h1:omHqsl8j+KXpmzRjF8bmzOSYJ8GnS0E3efi1wYT+niY=
+github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc=
github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU=
github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/gavv/httpexpect/v2 v2.1.0 h1:Q7xnFuKqBY2si4DsqxdbWBt9rfrbVTT2/9YSomc9tEw=
-github.com/gavv/httpexpect/v2 v2.1.0/go.mod h1:lnd0TqJLrP+wkJk3SFwtrpSlOAZQ7HaaIFuOYbgqgUM=
+github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/gavv/httpexpect/v2 v2.3.1 h1:sGLlKMn8AuHS9ztK9Sb7AJ7OxIL8v2PcLdyxfKt1Fo4=
+github.com/gavv/httpexpect/v2 v2.3.1/go.mod h1:yOE8m/aqFYQDNrgprMeXgq4YynfN9h1NgcE1+1suV64=
+github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
-github.com/gorilla/websocket v1.0.0 h1:J/mA+d2LqcDKjAEhQjXDHt9/e7Cnm+oBUwgHp5C6XDg=
-github.com/gorilla/websocket v1.0.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/imkira/go-interpol v1.0.0 h1:HrmLyvOLJyjR0YofMw8QGdCIuYOs4TJUBDNU5sJC09E=
github.com/imkira/go-interpol v1.0.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
-github.com/klauspost/compress v1.8.2 h1:Bx0qjetmNjdFXASH02NSAREKpiaDwkO1DRZ3dV2KCcs=
-github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w=
-github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
+github.com/klauspost/compress v1.12.2 h1:2KCfW3I9M7nSc5wOqXAlW2v2U6v+w6cbjvbfp+OykW8=
+github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
+github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
+github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
+github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c=
+github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/savsgio/gotils v0.0.0-20200117113501-90175b0fbe3f h1:PgA+Olipyj258EIEYnpFFONrrCcAIWNUNoFhUfMqAGY=
-github.com/savsgio/gotils v0.0.0-20200117113501-90175b0fbe3f/go.mod h1:lHhJedqxCoHN+zMtwGNTXWmF0u9Jt363FYRhV6g0CdY=
+github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873 h1:N3Af8f13ooDKcIhsmFT7Z05CStZWu4C7Md0uDEy4q6o=
+github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/tidwall/gjson v1.6.1 h1:LRbvNuNuvAiISWg6gxLEFuCe72UKy5hDqhxW/8183ws=
-github.com/tidwall/gjson v1.6.1/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0=
-github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
-github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
-github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
-github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/tidwall/gjson v1.11.0 h1:C16pk7tQNiH6VlCrtIXL1w8GaOsi1X3W8KDkE1BuYd4=
+github.com/tidwall/gjson v1.11.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
+github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
+github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
+github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
+github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.9.0 h1:hNpmUdy/+ZXYpGy0OBfm7K0UQTzb73W0T0U4iJIVrMw=
-github.com/valyala/fasthttp v1.9.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=
-github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
+github.com/valyala/fasthttp v1.27.0 h1:gDefRDL9aqSiwXV6aRW8aSBPs82y4KizSzHrBLf4NDI=
+github.com/valyala/fasthttp v1.27.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA=
+github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
@@ -73,29 +97,72 @@
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI=
github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
+golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I=
+golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
+golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e h1:C7q+e9M5nggAvWfVg9Nl66kebKeuJlP3FD58V4RR5wo=
moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e/go.mod h1:nejbQVfXh96n9dSF6cH3Jsk/QI1Z2oEL7sSI2ifXFNA=
diff --git a/api/test/e2enew/gzip/gzip_suite_test.go b/api/test/e2e/gzip/gzip_suite_test.go
similarity index 100%
rename from api/test/e2enew/gzip/gzip_suite_test.go
rename to api/test/e2e/gzip/gzip_suite_test.go
diff --git a/api/test/e2enew/gzip/gzip_test.go b/api/test/e2e/gzip/gzip_test.go
similarity index 95%
rename from api/test/e2enew/gzip/gzip_test.go
rename to api/test/e2e/gzip/gzip_test.go
index 5f764ec..fbacc27 100644
--- a/api/test/e2enew/gzip/gzip_test.go
+++ b/api/test/e2e/gzip/gzip_test.go
@@ -21,7 +21,7 @@
"github.com/onsi/ginkgo"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Gzip enable", func() {
diff --git a/api/test/e2enew/healthz/healthz_suite_test.go b/api/test/e2e/healthz/healthz_suite_test.go
similarity index 100%
rename from api/test/e2enew/healthz/healthz_suite_test.go
rename to api/test/e2e/healthz/healthz_suite_test.go
diff --git a/api/test/e2enew/healthz/healthz_test.go b/api/test/e2e/healthz/healthz_test.go
similarity index 95%
rename from api/test/e2enew/healthz/healthz_test.go
rename to api/test/e2e/healthz/healthz_test.go
index 870c1ed..4a5550f 100644
--- a/api/test/e2enew/healthz/healthz_test.go
+++ b/api/test/e2e/healthz/healthz_test.go
@@ -21,7 +21,7 @@
"github.com/onsi/ginkgo"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Healthy check", func() {
diff --git a/api/test/e2e/http.go b/api/test/e2e/http.go
deleted file mode 100644
index d6f1b6a..0000000
--- a/api/test/e2e/http.go
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package e2e
-
-import (
- "bytes"
- "encoding/json"
- "io"
- "io/ioutil"
- "mime/multipart"
- "net/http"
- "net/url"
- "os"
- "path/filepath"
- "strings"
-)
-
-type UploadFile struct {
- Name string
- Filepath string
-}
-
-var httpClient = &http.Client{}
-
-func PostFile(reqUrl string, reqParams map[string]string, files []UploadFile, headers map[string]string) ([]byte, int, error) {
- return post(reqUrl, reqParams, "multipart/form-data", files, headers)
-}
-
-func post(reqUrl string, reqParams map[string]string, contentType string, files []UploadFile, headers map[string]string) ([]byte, int, error) {
- requestBody, realContentType := getReader(reqParams, contentType, files)
- httpRequest, _ := http.NewRequest("POST", reqUrl, requestBody)
- httpRequest.Header.Add("Content-Type", realContentType)
- if headers != nil {
- for k, v := range headers {
- httpRequest.Header.Add(k, v)
- }
- }
- resp, err := httpClient.Do(httpRequest)
- if err != nil {
- panic(err)
- }
-
- defer resp.Body.Close()
-
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return nil, 0, err
- }
-
- return body, resp.StatusCode, nil
-}
-
-func getReader(reqParams map[string]string, contentType string, files []UploadFile) (io.Reader, string) {
- if strings.Index(contentType, "json") > -1 {
- bytesData, _ := json.Marshal(reqParams)
- return bytes.NewReader(bytesData), contentType
- }
- if files != nil {
- body := &bytes.Buffer{}
- writer := multipart.NewWriter(body)
- for _, uploadFile := range files {
- file, err := os.Open(uploadFile.Filepath)
- if err != nil {
- panic(err)
- }
- part, err := writer.CreateFormFile(uploadFile.Name, filepath.Base(uploadFile.Filepath))
- if err != nil {
- panic(err)
- }
- _, err = io.Copy(part, file)
- file.Close()
- }
- for k, v := range reqParams {
- if err := writer.WriteField(k, v); err != nil {
- panic(err)
- }
- }
- if err := writer.Close(); err != nil {
- panic(err)
- }
- return body, writer.FormDataContentType()
- }
-
- urlValues := url.Values{}
- for key, val := range reqParams {
- urlValues.Set(key, val)
- }
-
- reqBody := urlValues.Encode()
-
- return strings.NewReader(reqBody), contentType
-}
diff --git a/api/test/e2enew/id_compatible/id_compatible_suite_test.go b/api/test/e2e/id_compatible/id_compatible_suite_test.go
similarity index 95%
rename from api/test/e2enew/id_compatible/id_compatible_suite_test.go
rename to api/test/e2e/id_compatible/id_compatible_suite_test.go
index fa15893..e08ca87 100644
--- a/api/test/e2enew/id_compatible/id_compatible_suite_test.go
+++ b/api/test/e2e/id_compatible/id_compatible_suite_test.go
@@ -23,7 +23,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestIdCompatible(t *testing.T) {
diff --git a/api/test/e2enew/id_compatible/id_crossing_test.go b/api/test/e2e/id_compatible/id_crossing_test.go
similarity index 98%
rename from api/test/e2enew/id_compatible/id_crossing_test.go
rename to api/test/e2e/id_compatible/id_crossing_test.go
index be4561f..b768daf 100644
--- a/api/test/e2enew/id_compatible/id_crossing_test.go
+++ b/api/test/e2e/id_compatible/id_crossing_test.go
@@ -21,7 +21,7 @@
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = DescribeTable("Id Crossing",
diff --git a/api/test/e2enew/id_compatible/id_not_in_body_test.go b/api/test/e2e/id_compatible/id_not_in_body_test.go
similarity index 98%
rename from api/test/e2enew/id_compatible/id_not_in_body_test.go
rename to api/test/e2e/id_compatible/id_not_in_body_test.go
index 8227c76..1e155d8 100644
--- a/api/test/e2enew/id_compatible/id_not_in_body_test.go
+++ b/api/test/e2e/id_compatible/id_not_in_body_test.go
@@ -25,7 +25,7 @@
. "github.com/onsi/gomega"
"github.com/tidwall/gjson"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = DescribeTable("Id Not In Body",
diff --git a/api/test/e2enew/id_compatible/id_using_int_test.go b/api/test/e2e/id_compatible/id_using_int_test.go
similarity index 98%
rename from api/test/e2enew/id_compatible/id_using_int_test.go
rename to api/test/e2e/id_compatible/id_using_int_test.go
index 779ccb3..7a3350d 100644
--- a/api/test/e2enew/id_compatible/id_using_int_test.go
+++ b/api/test/e2e/id_compatible/id_using_int_test.go
@@ -21,7 +21,7 @@
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = DescribeTable("Id Using Int",
diff --git a/api/test/e2enew/id_compatible/id_using_string_test.go b/api/test/e2e/id_compatible/id_using_string_test.go
similarity index 98%
rename from api/test/e2enew/id_compatible/id_using_string_test.go
rename to api/test/e2e/id_compatible/id_using_string_test.go
index 54bb30e..dc326f5 100644
--- a/api/test/e2enew/id_compatible/id_using_string_test.go
+++ b/api/test/e2e/id_compatible/id_using_string_test.go
@@ -21,7 +21,7 @@
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = DescribeTable("Id Using String",
diff --git a/api/test/e2e/id_compatible_test.go b/api/test/e2e/id_compatible_test.go
deleted file mode 100644
index a7d6113..0000000
--- a/api/test/e2e/id_compatible_test.go
+++ /dev/null
@@ -1,478 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package e2e
-
-import (
- "io/ioutil"
- "net/http"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
- "github.com/tidwall/gjson"
-)
-
-func TestID_Using_Int(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "create upstream",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/upstreams",
- Body: `{
- "id": 1,
- "nodes": [{
- "host": "` + UpstreamIp + `",
- "port": 1980,
- "weight": 1
- }],
- "type": "roundrobin"
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "create route using the upstream just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/1",
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "upstream_id": 1
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "create service",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/services",
- Body: `{
- "id": 1,
- "upstream_id": 1
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "update route to use the service just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/1",
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "service_id": 1
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just updated",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "delete the route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "delete the service",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/services/1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "make sure the service has been deleted",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/services/1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "delete the upstream",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/upstreams/1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "make sure the upstream has been deleted",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/upstreams/1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "hit deleted route",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestID_Using_String(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "create upstream",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/upstreams",
- Body: `{
- "id": "2",
- "nodes": [{
- "host": "` + UpstreamIp + `",
- "port": 1980,
- "weight": 1
- }],
- "type": "roundrobin"
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "create route using the upstream just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/2",
- Body: `{
- "name": "route2",
- "uri": "/hello",
- "upstream_id": "2"
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "delete the route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/2",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "delete the upstream",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/upstreams/2",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "make sure the upstream has been deleted",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/upstreams/2",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "hit deleted route",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestID_Crossing(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "create upstream by admin api",
- Object: APISIXExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/upstreams",
- Body: `{
- "id": 3,
- "nodes": [{
- "host": "` + UpstreamIp + `",
- "port": 1980,
- "weight": 1
- }],
- "type": "roundrobin"
- }`,
- Headers: map[string]string{"X-API-KEY": "edd1c9f034335f136f87ad84b625c8f1"},
- ExpectStatus: http.StatusCreated,
- },
- {
- Desc: "create route by admin api",
- Object: APISIXExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/3",
- Body: `{
- "name": "route3",
- "uri": "/hello",
- "upstream_id": 3
- }`,
- Headers: map[string]string{"X-API-KEY": "edd1c9f034335f136f87ad84b625c8f1"},
- ExpectStatus: http.StatusCreated,
- Sleep: sleepTime,
- },
- {
- Desc: "verify that the upstream is available for manager api",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/upstreams/3",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: `"id":3`,
- Sleep: sleepTime,
- },
- {
- Desc: "verify that the route is available for manager api",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes/3",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: `"upstream_id":3`,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "delete the route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/3",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "delete the upstream",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/upstreams/3",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "make sure the upstream has been deleted",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/upstreams/3",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "hit deleted route",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestID_Not_In_Body(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "make sure the route is not created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "create route that has no ID in request body by admin api",
- Object: APISIXExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- }
- }
- }`,
- Headers: map[string]string{"X-API-KEY": "edd1c9f034335f136f87ad84b625c8f1"},
- ExpectStatus: http.StatusCreated,
- Sleep: sleepTime,
- },
- {
- Desc: "verify that the route is available for manager api",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: `"id":"r1"`,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "delete the route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "hit deleted route",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "create route that has no ID in request body by admin api (POST)",
- Object: APISIXExpect(t),
- Method: http.MethodPost,
- Path: "/apisix/admin/routes",
- Body: `{
- "uri": "/hello",
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- }
- }
- }`,
- Headers: map[string]string{"X-API-KEY": "edd1c9f034335f136f87ad84b625c8f1"},
- ExpectStatus: http.StatusCreated,
- Sleep: sleepTime,
- },
- {
- Desc: "verify that the route is available for manager api",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: `"uri":"/hello"`,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-
- // delete the route created by POST
- time.Sleep(time.Duration(100) * time.Millisecond)
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ := ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete the route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- testCaseCheck(tc, t)
- }
-}
diff --git a/api/test/e2enew/label/label_suite_test.go b/api/test/e2e/label/label_suite_test.go
similarity index 100%
rename from api/test/e2enew/label/label_suite_test.go
rename to api/test/e2e/label/label_suite_test.go
diff --git a/api/test/e2enew/label/label_test.go b/api/test/e2e/label/label_test.go
similarity index 99%
rename from api/test/e2enew/label/label_test.go
rename to api/test/e2e/label/label_test.go
index 954f72d..d15bc01 100644
--- a/api/test/e2enew/label/label_test.go
+++ b/api/test/e2e/label/label_test.go
@@ -21,7 +21,7 @@
"github.com/onsi/ginkgo"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Test label", func() {
diff --git a/api/test/e2enew/migrate/migrate_suite_test.go b/api/test/e2e/migrate/migrate_suite_test.go
similarity index 95%
rename from api/test/e2enew/migrate/migrate_suite_test.go
rename to api/test/e2e/migrate/migrate_suite_test.go
index 12acaa3..9f62421 100644
--- a/api/test/e2enew/migrate/migrate_suite_test.go
+++ b/api/test/e2e/migrate/migrate_suite_test.go
@@ -24,7 +24,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestMigrate(t *testing.T) {
diff --git a/api/test/e2enew/migrate/migrate_test.go b/api/test/e2e/migrate/migrate_test.go
similarity index 99%
rename from api/test/e2enew/migrate/migrate_test.go
rename to api/test/e2e/migrate/migrate_test.go
index c3ff88d..79f3929 100644
--- a/api/test/e2enew/migrate/migrate_test.go
+++ b/api/test/e2e/migrate/migrate_test.go
@@ -29,7 +29,7 @@
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
const (
diff --git a/api/test/e2enew/plugin_config/plugin_config_suite_test.go b/api/test/e2e/plugin_config/plugin_config_suite_test.go
similarity index 95%
rename from api/test/e2enew/plugin_config/plugin_config_suite_test.go
rename to api/test/e2e/plugin_config/plugin_config_suite_test.go
index 3f08278..102ed9e 100644
--- a/api/test/e2enew/plugin_config/plugin_config_suite_test.go
+++ b/api/test/e2e/plugin_config/plugin_config_suite_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestPluginConfig(t *testing.T) {
diff --git a/api/test/e2enew/plugin_config/plugin_config_test.go b/api/test/e2e/plugin_config/plugin_config_test.go
similarity index 99%
rename from api/test/e2enew/plugin_config/plugin_config_test.go
rename to api/test/e2e/plugin_config/plugin_config_test.go
index 4f69813..ac01c07 100644
--- a/api/test/e2enew/plugin_config/plugin_config_test.go
+++ b/api/test/e2e/plugin_config/plugin_config_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Plugin Config", func() {
diff --git a/api/test/e2enew/proto/proto_suite_test.go b/api/test/e2e/proto/proto_suite_test.go
similarity index 95%
rename from api/test/e2enew/proto/proto_suite_test.go
rename to api/test/e2e/proto/proto_suite_test.go
index ab0b826..4386887 100644
--- a/api/test/e2enew/proto/proto_suite_test.go
+++ b/api/test/e2e/proto/proto_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestRoute(t *testing.T) {
diff --git a/api/test/e2enew/proto/proto_test.go b/api/test/e2e/proto/proto_test.go
similarity index 99%
rename from api/test/e2enew/proto/proto_test.go
rename to api/test/e2e/proto/proto_test.go
index 0b16980..ad5fa4e 100644
--- a/api/test/e2enew/proto/proto_test.go
+++ b/api/test/e2e/proto/proto_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var correctProtobuf = `syntax = "proto3";
diff --git a/api/test/e2enew/route/host_test.go b/api/test/e2e/route/host_test.go
similarity index 99%
rename from api/test/e2enew/route/host_test.go
rename to api/test/e2e/route/host_test.go
index 71e141a..36563de 100644
--- a/api/test/e2enew/route/host_test.go
+++ b/api/test/e2e/route/host_test.go
@@ -22,7 +22,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = Describe("Route", func() {
diff --git a/api/test/e2enew/route/route_export_test.go b/api/test/e2e/route/route_export_test.go
similarity index 99%
rename from api/test/e2enew/route/route_export_test.go
rename to api/test/e2e/route/route_export_test.go
index de9923c..c3df0d8 100644
--- a/api/test/e2enew/route/route_export_test.go
+++ b/api/test/e2e/route/route_export_test.go
@@ -24,7 +24,7 @@
"github.com/onsi/ginkgo"
"github.com/stretchr/testify/assert"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Route", func() {
diff --git a/api/test/e2enew/route/route_service_upstream_test.go b/api/test/e2e/route/route_service_upstream_test.go
similarity index 99%
rename from api/test/e2enew/route/route_service_upstream_test.go
rename to api/test/e2e/route/route_service_upstream_test.go
index a4b3c45..4e4591c 100644
--- a/api/test/e2enew/route/route_service_upstream_test.go
+++ b/api/test/e2e/route/route_service_upstream_test.go
@@ -24,7 +24,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("create route that not exists service or upstream", func() {
diff --git a/api/test/e2enew/route/route_suite_test.go b/api/test/e2e/route/route_suite_test.go
similarity index 95%
rename from api/test/e2enew/route/route_suite_test.go
rename to api/test/e2e/route/route_suite_test.go
index ff82374..9d44828 100644
--- a/api/test/e2enew/route/route_suite_test.go
+++ b/api/test/e2e/route/route_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestRoute(t *testing.T) {
diff --git a/api/test/e2enew/route/route_test.go b/api/test/e2e/route/route_test.go
similarity index 99%
rename from api/test/e2enew/route/route_test.go
rename to api/test/e2e/route/route_test.go
index acba6cb..7fd8d6b 100644
--- a/api/test/e2enew/route/route_test.go
+++ b/api/test/e2e/route/route_test.go
@@ -22,7 +22,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = Describe("Route", func() {
diff --git a/api/test/e2enew/route/route_with_management_fields_test.go b/api/test/e2e/route/route_with_management_fields_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_management_fields_test.go
rename to api/test/e2e/route/route_with_management_fields_test.go
index c965a34..37d16d6 100644
--- a/api/test/e2enew/route/route_with_management_fields_test.go
+++ b/api/test/e2e/route/route_with_management_fields_test.go
@@ -26,7 +26,7 @@
"github.com/onsi/gomega"
"github.com/tidwall/gjson"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with management fields", func() {
diff --git a/api/test/e2enew/route/route_with_methods_test.go b/api/test/e2e/route/route_with_methods_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_methods_test.go
rename to api/test/e2e/route/route_with_methods_test.go
index 79b72e2..df81dbb 100644
--- a/api/test/e2enew/route/route_with_methods_test.go
+++ b/api/test/e2e/route/route_with_methods_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with methods", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_cors_test.go b/api/test/e2e/route/route_with_plugin_cors_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_plugin_cors_test.go
rename to api/test/e2e/route/route_with_plugin_cors_test.go
index dce72f7..c3c8760 100644
--- a/api/test/e2enew/route/route_with_plugin_cors_test.go
+++ b/api/test/e2e/route/route_with_plugin_cors_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with plugin cors", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_http_logger_test.go b/api/test/e2e/route/route_with_plugin_http_logger_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_plugin_http_logger_test.go
rename to api/test/e2e/route/route_with_plugin_http_logger_test.go
index 8535295..0509d43 100644
--- a/api/test/e2enew/route/route_with_plugin_http_logger_test.go
+++ b/api/test/e2e/route/route_with_plugin_http_logger_test.go
@@ -24,7 +24,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with plugin http logger", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_jwt_test.go b/api/test/e2e/route/route_with_plugin_jwt_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_plugin_jwt_test.go
rename to api/test/e2e/route/route_with_plugin_jwt_test.go
index af273bd..8c7c508 100644
--- a/api/test/e2enew/route/route_with_plugin_jwt_test.go
+++ b/api/test/e2e/route/route_with_plugin_jwt_test.go
@@ -25,7 +25,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with jwt plugin", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_limit_count_test.go b/api/test/e2e/route/route_with_plugin_limit_count_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_plugin_limit_count_test.go
rename to api/test/e2e/route/route_with_plugin_limit_count_test.go
index a25d15c..bae972b 100644
--- a/api/test/e2enew/route/route_with_plugin_limit_count_test.go
+++ b/api/test/e2e/route/route_with_plugin_limit_count_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with limit plugin", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_orchestration_test.go b/api/test/e2e/route/route_with_plugin_orchestration_test.go
similarity index 98%
rename from api/test/e2enew/route/route_with_plugin_orchestration_test.go
rename to api/test/e2e/route/route_with_plugin_orchestration_test.go
index 304240f..5795f6f 100644
--- a/api/test/e2enew/route/route_with_plugin_orchestration_test.go
+++ b/api/test/e2e/route/route_with_plugin_orchestration_test.go
@@ -25,7 +25,7 @@
"github.com/onsi/gomega"
"github.com/tidwall/gjson"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with plugin orchestration", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_prometheus_test.go b/api/test/e2e/route/route_with_plugin_prometheus_test.go
similarity index 98%
rename from api/test/e2enew/route/route_with_plugin_prometheus_test.go
rename to api/test/e2e/route/route_with_plugin_prometheus_test.go
index 3e8ab15..0ebd371 100644
--- a/api/test/e2enew/route/route_with_plugin_prometheus_test.go
+++ b/api/test/e2e/route/route_with_plugin_prometheus_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with plugin prometheus", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_proxy_rewrite_test.go b/api/test/e2e/route/route_with_plugin_proxy_rewrite_test.go
similarity index 98%
rename from api/test/e2enew/route/route_with_plugin_proxy_rewrite_test.go
rename to api/test/e2e/route/route_with_plugin_proxy_rewrite_test.go
index f13e815..2f1903b 100644
--- a/api/test/e2enew/route/route_with_plugin_proxy_rewrite_test.go
+++ b/api/test/e2e/route/route_with_plugin_proxy_rewrite_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with plugin proxy rewrite", func() {
diff --git a/api/test/e2enew/route/route_with_plugin_uri_blocker_test.go b/api/test/e2e/route/route_with_plugin_uri_blocker_test.go
similarity index 98%
rename from api/test/e2enew/route/route_with_plugin_uri_blocker_test.go
rename to api/test/e2e/route/route_with_plugin_uri_blocker_test.go
index 5bb43cc..96f14a4 100644
--- a/api/test/e2enew/route/route_with_plugin_uri_blocker_test.go
+++ b/api/test/e2e/route/route_with_plugin_uri_blocker_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with plugin uri blocker", func() {
diff --git a/api/test/e2enew/route/route_with_priority_test.go b/api/test/e2e/route/route_with_priority_test.go
similarity index 98%
rename from api/test/e2enew/route/route_with_priority_test.go
rename to api/test/e2e/route/route_with_priority_test.go
index e2f8695..39f32d8 100644
--- a/api/test/e2enew/route/route_with_priority_test.go
+++ b/api/test/e2e/route/route_with_priority_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with priority test", func() {
diff --git a/api/test/e2enew/route/route_with_remote_addr_test.go b/api/test/e2e/route/route_with_remote_addr_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_remote_addr_test.go
rename to api/test/e2e/route/route_with_remote_addr_test.go
index d8f9b9e..0340359 100644
--- a/api/test/e2enew/route/route_with_remote_addr_test.go
+++ b/api/test/e2e/route/route_with_remote_addr_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with valid remote_addr remote_addrs", func() {
diff --git a/api/test/e2enew/route/route_with_script_luacode_test.go b/api/test/e2e/route/route_with_script_luacode_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_script_luacode_test.go
rename to api/test/e2e/route/route_with_script_luacode_test.go
index 29e070d..28bbd3b 100644
--- a/api/test/e2enew/route/route_with_script_luacode_test.go
+++ b/api/test/e2e/route/route_with_script_luacode_test.go
@@ -24,7 +24,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("route with script lucacode", func() {
diff --git a/api/test/e2enew/route/route_with_uri_uris_test.go b/api/test/e2e/route/route_with_uri_uris_test.go
similarity index 98%
rename from api/test/e2enew/route/route_with_uri_uris_test.go
rename to api/test/e2e/route/route_with_uri_uris_test.go
index c272fcf..3e1081b 100644
--- a/api/test/e2enew/route/route_with_uri_uris_test.go
+++ b/api/test/e2e/route/route_with_uri_uris_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("test route with valid uri uris", func() {
diff --git a/api/test/e2enew/route/route_with_vars_test.go b/api/test/e2e/route/route_with_vars_test.go
similarity index 99%
rename from api/test/e2enew/route/route_with_vars_test.go
rename to api/test/e2e/route/route_with_vars_test.go
index 5a7152c..723575a 100644
--- a/api/test/e2enew/route/route_with_vars_test.go
+++ b/api/test/e2e/route/route_with_vars_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var upstream map[string]interface{} = map[string]interface{}{
diff --git a/api/test/e2e/route_import_test.go b/api/test/e2e/route_import_test.go
deleted file mode 100644
index 3043abb..0000000
--- a/api/test/e2e/route_import_test.go
+++ /dev/null
@@ -1,713 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package e2e
-
-import (
- "io/ioutil"
- "net/http"
- "path/filepath"
- "strings"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
- "github.com/tidwall/gjson"
-)
-
-func TestImport_default(t *testing.T) {
- path, err := filepath.Abs("../testdata/import/default.yaml")
- assert.Nil(t, err)
-
- headers := map[string]string{
- "Authorization": token,
- }
- files := []UploadFile{
- {Name: "file", Filepath: path},
- }
- PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
-
- // sleep for data sync
- time.Sleep(sleepTime)
-
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ := ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
-
- var tests []HttpTestCase
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "route patch for update status(online)",
- Object: ManagerApiExpect(t),
- Method: http.MethodPatch,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Body: `{"status":1}`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- }
- tests = append(tests, tc)
- }
-
- // verify route
- tests = append(tests, HttpTestCase{
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- })
-
- // delete test data
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- tests = append(tests, tc)
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestImport_json(t *testing.T) {
- path, err := filepath.Abs("../testdata/import/default.json")
- assert.Nil(t, err)
-
- headers := map[string]string{
- "Authorization": token,
- }
- files := []UploadFile{
- {Name: "file", Filepath: path},
- }
- PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
-
- // sleep for data sync
- time.Sleep(sleepTime)
-
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ := ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
-
- var tests []HttpTestCase
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "route patch for update status(online)",
- Object: ManagerApiExpect(t),
- Method: http.MethodPatch,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Body: `{"status":1}`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- }
- tests = append(tests, tc)
- }
-
- // verify route
- tests = append(tests, HttpTestCase{
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- })
-
- // delete test data
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- tests = append(tests, tc)
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestImport_with_plugins(t *testing.T) {
- path, err := filepath.Abs("../testdata/import/with-plugins.yaml")
- assert.Nil(t, err)
-
- headers := map[string]string{
- "Authorization": token,
- }
- files := []UploadFile{
- {Name: "file", Filepath: path},
- }
- PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
-
- // sleep for data sync
- time.Sleep(sleepTime)
-
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ := ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
-
- var tests []HttpTestCase
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "route patch for update status(online)",
- Object: ManagerApiExpect(t),
- Method: http.MethodPatch,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Body: `{"status":1}`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- }
- tests = append(tests, tc)
- }
-
- // verify route
- verifyTests := []HttpTestCase{
- {
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodPost,
- Path: "/hello",
- Body: `{}`,
- ExpectStatus: http.StatusBadRequest,
- ExpectBody: `property "id" is required`,
- Sleep: sleepTime,
- },
- {
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodPost,
- Path: "/hello",
- Headers: map[string]string{"id": "1"},
- Body: `{}`,
- ExpectStatus: http.StatusBadRequest,
- ExpectBody: `property "status" is required`,
- Sleep: sleepTime,
- },
- {
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodPost,
- Path: "/hello",
- Headers: map[string]string{"id": "1"},
- Body: `{"status": "1"}`,
- ExpectStatus: http.StatusUnauthorized,
- ExpectBody: `{"message":"Missing authorization in request"}`,
- Sleep: sleepTime,
- },
- }
- tests = append(tests, verifyTests...)
-
- // delete test data
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- tests = append(tests, tc)
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestImport_with_multi_routes(t *testing.T) {
- path, err := filepath.Abs("../testdata/import/multi-routes.yaml")
- assert.Nil(t, err)
-
- headers := map[string]string{
- "Authorization": token,
- }
- files := []UploadFile{
- {Name: "file", Filepath: path},
- }
- PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
-
- // sleep for data sync
- time.Sleep(sleepTime)
-
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ := ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
-
- assert.Equal(t, 2, len(list))
-
- var tests []HttpTestCase
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "route patch for update status(online)",
- Object: ManagerApiExpect(t),
- Method: http.MethodPatch,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Body: `{"status":1}`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- }
- tests = append(tests, tc)
- uris := route["uris"].([]interface{})
- isGet := false
- for _, uri := range uris {
- if uri == "/get" {
- isGet = true
- }
- }
- // verify route data
- if isGet {
- tcDataVerify := HttpTestCase{
- Desc: "verify data of route",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{`"methods":["GET","POST","HEAD","PUT","PATCH","DELETE"]`,
- `"proxy-rewrite":{"disable":false,"scheme":"http"}`,
- `"labels":{"API_VERSION":"v2","dev":"test"}`,
- `"upstream":{"nodes":[{"host":"172.16.238.20","port":80,"weight":1,"priority":10}],"timeout":{"connect":6000,"send":6000,"read":6000},"type":"roundrobin","pass_host":"node"}`,
- },
- Sleep: sleepTime,
- }
- tests = append(tests, tcDataVerify)
- } else {
- tcDataVerify := HttpTestCase{
- Desc: "verify data of route2",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{`"methods":["POST"]`,
- `"proxy-rewrite":{"disable":false,"scheme":"http"}`,
- `"labels":{"API_VERSION":"v1","version":"v1"}`,
- `"upstream":{"nodes":[{"host":"172.16.238.20","port":80,"weight":1,"priority":10}],"timeout":{"connect":6000,"send":6000,"read":6000},"type":"roundrobin","pass_host":"node"}`,
- },
- Sleep: sleepTime,
- }
- tests = append(tests, tcDataVerify)
- }
- }
-
- // verify route
- verifyTests := []HttpTestCase{
- {
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/get",
- ExpectStatus: http.StatusOK,
- ExpectBody: `/get`,
- Sleep: sleepTime,
- },
- {
- Desc: "verify the route just imported",
- Object: APISIXExpect(t),
- Method: http.MethodPost,
- Path: "/post",
- ExpectStatus: http.StatusOK,
- ExpectBody: `/post`,
- Sleep: sleepTime,
- },
- }
- tests = append(tests, verifyTests...)
-
- // delete test data
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- tests = append(tests, tc)
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestRoute_export_import(t *testing.T) {
- // create routes
- tests := []HttpTestCase{
- {
- Desc: "Create a route",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "uris": ["/test-test1"],
- "name": "route_all1",
- "desc": "所有",
- "methods": ["GET"],
- "hosts": ["test.com"],
- "status": 1,
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "Create a route2",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r2",
- Body: `{
- "uris": ["/test-test2"],
- "name": "route_all2",
- "desc": "所有1",
- "methods": ["GET"],
- "hosts": ["test.com"],
- "status": 1,
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "Create a route3",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r3",
- Body: `{
- "uris": ["/test-test3"],
- "name": "route_all3",
- "desc": "所有2",
- "methods": ["GET"],
- "hosts": ["test.com"],
- "status": 1,
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- }
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-
- // export routes
- time.Sleep(sleepTime)
- tmpPath := "/tmp/export.json"
- headers := map[string]string{
- "Authorization": token,
- }
- body, status, err := httpGet(ManagerAPIHost+"/apisix/admin/export/routes", headers)
- assert.Nil(t, err)
- assert.Equal(t, http.StatusOK, status)
-
- content := gjson.Get(string(body), "data")
- err = ioutil.WriteFile(tmpPath, []byte(content.Raw), 0644)
- assert.Nil(t, err)
-
- // import routes (should failed -- duplicate)
- files := []UploadFile{
- {Name: "file", Filepath: tmpPath},
- }
- respBody, status, err := PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
- assert.Nil(t, err)
- assert.Equal(t, 400, status)
- assert.True(t, strings.Contains(string(respBody), "duplicate"))
- time.Sleep(sleepTime)
-
- // delete routes
- tests = []HttpTestCase{
- {
- Desc: "delete the route1 just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "delete the route2 just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r2",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "delete the route3 just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r3",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- }
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-
- // import again
- time.Sleep(sleepTime)
- respBody, status, err = PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
- assert.Nil(t, err)
- assert.Equal(t, 200, status)
- assert.True(t, strings.Contains(string(respBody), `"data":{"paths":3,"routes":3}`))
- time.Sleep(sleepTime)
-
- // sleep for data sync
- time.Sleep(sleepTime)
-
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ = ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
-
- assert.Equal(t, 3, len(list))
-
- // verify route data
- tests = []HttpTestCase{}
- for _, item := range list {
- route := item.(map[string]interface{})
- tcDataVerify := HttpTestCase{
- Desc: "verify data of route2",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{`"methods":["GET"]`,
- `"desc":"所有`,
- `"hosts":["test.com"]`,
- `"upstream":{"nodes":[{"host":"` + UpstreamIp + `","port":1980,"weight":1}],"type":"roundrobin"}`,
- },
- Sleep: sleepTime,
- }
- tests = append(tests, tcDataVerify)
- }
-
- // delete test data
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- tests = append(tests, tc)
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestRoute_export_import_merge(t *testing.T) {
- // create routes
- tests := []HttpTestCase{
- {
- Desc: "Create a route",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "id": "r1",
- "uris": ["/test1", "/test2"],
- "name": "route_all",
- "desc": "所有",
- "methods": ["GET","POST","PUT","DELETE"],
- "hosts": ["test.com"],
- "status": 1,
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- }
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-
- // export routes
- time.Sleep(sleepTime)
- tmpPath := "/tmp/export.json"
- headers := map[string]string{
- "Authorization": token,
- }
- body, status, err := httpGet(ManagerAPIHost+"/apisix/admin/export/routes", headers)
- assert.Nil(t, err)
- assert.Equal(t, http.StatusOK, status)
-
- content := gjson.Get(string(body), "data")
- err = ioutil.WriteFile(tmpPath, []byte(content.Raw), 0644)
- assert.Nil(t, err)
-
- // import routes (should failed -- duplicate)
- files := []UploadFile{
- {Name: "file", Filepath: tmpPath},
- }
- respBody, status, err := PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
- assert.Nil(t, err)
- assert.Equal(t, 400, status)
- assert.True(t, strings.Contains(string(respBody), "duplicate"))
- time.Sleep(sleepTime)
-
- // delete routes
- tests = []HttpTestCase{
- {
- Desc: "delete the route1 just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- }
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-
- // import again
- time.Sleep(sleepTime)
- respBody, status, err = PostFile(ManagerAPIHost+"/apisix/admin/import/routes", nil, files, headers)
- assert.Nil(t, err)
- assert.Equal(t, 200, status)
- assert.True(t, strings.Contains(string(respBody), `"data":{"paths":2,"routes":1}`))
- time.Sleep(sleepTime)
-
- // sleep for data sync
- time.Sleep(sleepTime)
-
- request, _ := http.NewRequest("GET", ManagerAPIHost+"/apisix/admin/routes", nil)
- request.Header.Add("Authorization", token)
- resp, err := http.DefaultClient.Do(request)
- assert.Nil(t, err)
- defer resp.Body.Close()
- respBody, _ = ioutil.ReadAll(resp.Body)
- list := gjson.Get(string(respBody), "data.rows").Value().([]interface{})
-
- assert.Equal(t, 1, len(list))
-
- // verify route data
- tests = []HttpTestCase{}
- for _, item := range list {
- route := item.(map[string]interface{})
- tcDataVerify := HttpTestCase{
- Desc: "verify data of route2",
- Object: ManagerApiExpect(t),
- Method: http.MethodGet,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{`"methods":["GET","POST","PUT","DELETE"]`,
- `"/test1"`,
- `"/test2"`,
- `"desc":"所有`,
- `"hosts":["test.com"]`,
- `"upstream":{"nodes":[{"host":"` + UpstreamIp + `","port":1980,"weight":1}],"type":"roundrobin"}`,
- },
- Sleep: sleepTime,
- }
- tests = append(tests, tcDataVerify)
- }
-
- // delete test data
- for _, item := range list {
- route := item.(map[string]interface{})
- tc := HttpTestCase{
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/" + route["id"].(string),
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- }
- tests = append(tests, tc)
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
diff --git a/api/test/e2enew/route_online_debug/route_online_debug_suite_test.go b/api/test/e2e/route_online_debug/route_online_debug_suite_test.go
similarity index 95%
rename from api/test/e2enew/route_online_debug/route_online_debug_suite_test.go
rename to api/test/e2e/route_online_debug/route_online_debug_suite_test.go
index 219d8d3..3e9b149 100644
--- a/api/test/e2enew/route_online_debug/route_online_debug_suite_test.go
+++ b/api/test/e2e/route_online_debug/route_online_debug_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestRoute(t *testing.T) {
diff --git a/api/test/e2enew/route_online_debug/route_online_debug_test.go b/api/test/e2e/route_online_debug/route_online_debug_test.go
similarity index 99%
rename from api/test/e2enew/route_online_debug/route_online_debug_test.go
rename to api/test/e2e/route_online_debug/route_online_debug_test.go
index c32e59a..4a3fda8 100644
--- a/api/test/e2enew/route_online_debug/route_online_debug_test.go
+++ b/api/test/e2e/route_online_debug/route_online_debug_test.go
@@ -28,7 +28,7 @@
"github.com/onsi/gomega"
"github.com/tidwall/gjson"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var upstream map[string]interface{} = map[string]interface{}{
diff --git a/api/test/e2e/route_test.go b/api/test/e2e/route_test.go
deleted file mode 100644
index a0cc072..0000000
--- a/api/test/e2e/route_test.go
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package e2e
-
-import (
- "net/http"
- "testing"
-)
-
-func TestRoute_Invalid_Host(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "invalid host",
- Object: ManagerApiExpect(t),
- Path: "/apisix/admin/routes/r1",
- Method: http.MethodPut,
- Body: `{
- "name": "route1",
- "uri": "/hello_",
- "host": "$%$foo.com",
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- },
- {
- Desc: "invalid hosts",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello_",
- "hosts": ["$%$foo.com", "*.bar.com"],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- },
- {
- Desc: "create route with host and hosts together at the same time",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello_",
- "host": "github.com",
- "hosts": ["foo.com", "*.bar.com"],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- },
- {
- Desc: "hit route not created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- {
- Desc: "hit route not created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "$%$foo.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestRoute_Create_With_Hosts(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "hit route that not exist",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- {
- Desc: "create route",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello_",
- "hosts": ["foo.com", "*.bar.com"],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{"\"id\":\"r1\"", "\"uri\":\"/hello_\""},
- },
- {
- Desc: "create route with int uri",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": 123456
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- },
- {
- Desc: "hit the route just created - wildcard domain name",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "test.bar.com"},
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world\n",
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world\n",
- },
- {
- Desc: "hit the route not exists",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_111",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- {
- Desc: "delete the route just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "hit the route just deleted",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "bar.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestRoute_Update_Routes_With_Hosts(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "hit route that not exist",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- {
- Desc: "create route with host foo.com",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "methods": ["GET"],
- "hosts": ["foo.com"],
- "upstream": {
- "type": "roundrobin",
- "nodes": [{
- "host": "` + UpstreamIp + `",
- "port": 1980,
- "weight": 1
- }]
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{"\"id\":\"r1\"", "\"hosts\":[\"foo.com\"]"},
- },
- {
- Desc: "hit the route just create",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusOK,
- Sleep: sleepTime,
- },
- {
- Desc: "update route with host bar.com",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "hosts": ["bar.com"],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- ExpectBody: []string{"\"id\":\"r1\"", "\"hosts\":[\"bar.com\"]"},
- },
- {
- Desc: "hit the route with host foo.com",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusNotFound,
- Sleep: sleepTime,
- },
- {
- Desc: "hit the route just updated",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- Headers: map[string]string{"Host": "bar.com"},
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world\n",
- },
- {
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "hit the route just deleted",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- Headers: map[string]string{"Host": "bar.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestRoute_Patch(t *testing.T) {
- tests := []HttpTestCase{
- {
-
- Desc: "make sure the route not exists",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- {
- Desc: "create route",
- Object: ManagerApiExpect(t),
- Method: http.MethodPut,
- Path: "/apisix/admin/routes/r1",
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "hit the route just created ",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "route patch for update status(route offline)",
- Object: ManagerApiExpect(t),
- Method: http.MethodPatch,
- Path: "/apisix/admin/routes/r1",
- Body: `{"status":0}`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "make sure the route has been offline",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- Sleep: sleepTime,
- },
- {
- Desc: "route patch for update status (route online)",
- Object: ManagerApiExpect(t),
- Method: http.MethodPatch,
- Path: "/apisix/admin/routes/r1/status",
- Body: "1",
- Headers: map[string]string{
- "Authorization": token,
- "Content-Type": "text/plain",
- },
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "make sure the route has been online",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world",
- Sleep: sleepTime,
- },
- {
- Desc: "delete route",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "hit the route just deleted",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- Sleep: sleepTime,
- },
- }
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-//uris methods remote_addrs
-func TestRoute_With_Empty_Array(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "create route with empty hosts and host",
- Object: ManagerApiExpect(t),
- Path: "/apisix/admin/routes/r1",
- Method: http.MethodPut,
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "hosts": [],
- "host": "test.com",
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- ExpectBody: `{"code":10000,"message":"schema validate failed: (root): Must validate one and only one schema (oneOf)\n(root): Must validate all the schemas (allOf)\nhosts: Array must have at least 1 items"}`,
- },
- {
- Desc: "make sure the route not created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- Headers: map[string]string{"Host": "test.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: `{"error_msg":"404 Route Not Found"}`,
- },
- {
- Desc: "create route with empty hosts",
- Object: ManagerApiExpect(t),
- Path: "/apisix/admin/routes/r1",
- Method: http.MethodPut,
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "hosts": [],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- ExpectBody: `{"code":10000,"message":"schema validate failed: hosts: Array must have at least 1 items"}`,
- },
- {
- Desc: "make sure the route not created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- ExpectBody: `{"error_msg":"404 Route Not Found"}`,
- },
- {
- Desc: "create route with empty uris and uri",
- Object: ManagerApiExpect(t),
- Path: "/apisix/admin/routes/r1",
- Method: http.MethodPut,
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "uris": [],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- ExpectBody: `{"code":10000,"message":"schema validate failed: (root): Must validate one and only one schema (oneOf)\n(root): Must validate all the schemas (allOf)\nuris: Array must have at least 1 items"}`,
- },
- {
- Desc: "create route with empty remote_addrs and remote_addr",
- Object: ManagerApiExpect(t),
- Path: "/apisix/admin/routes/r1",
- Method: http.MethodPut,
- Body: `{
- "name": "route1",
- "uri": "/hello",
- "remote_addrs": [],
- "remote_addr": "0.0.0.0",
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusBadRequest,
- ExpectBody: `{"code":10000,"message":"schema validate failed: (root): Must validate one and only one schema (oneOf)\n(root): Must validate all the schemas (allOf)\nremote_addrs: Array must have at least 1 items"}`,
- },
- {
- Desc: "make sure the route not created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello",
- ExpectStatus: http.StatusNotFound,
- ExpectBody: `{"error_msg":"404 Route Not Found"}`,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
-
-func TestRoute_Create_via_POST(t *testing.T) {
- tests := []HttpTestCase{
- {
- Desc: "hit route that not exist",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- },
- {
- Desc: "create route via HTTP POST",
- Object: ManagerApiExpect(t),
- Method: http.MethodPost,
- Path: "/apisix/admin/routes",
- Body: `{
- "id": "r1",
- "name": "route1",
- "uri": "/hello_",
- "hosts": ["foo.com", "*.bar.com"],
- "upstream": {
- "nodes": {
- "` + UpstreamIp + `:1980": 1
- },
- "type": "roundrobin"
- }
- }`,
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- // Check the returned value
- ExpectBody: "\"id\":\"r1\"",
- },
- {
- Desc: "hit the route just created",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "foo.com"},
- ExpectStatus: http.StatusOK,
- ExpectBody: "hello world\n",
- },
- {
- Desc: "delete the route just created",
- Object: ManagerApiExpect(t),
- Method: http.MethodDelete,
- Path: "/apisix/admin/routes/r1",
- Headers: map[string]string{"Authorization": token},
- ExpectStatus: http.StatusOK,
- },
- {
- Desc: "hit the route just deleted",
- Object: APISIXExpect(t),
- Method: http.MethodGet,
- Path: "/hello_",
- Headers: map[string]string{"Host": "bar.com"},
- ExpectStatus: http.StatusNotFound,
- ExpectBody: "{\"error_msg\":\"404 Route Not Found\"}\n",
- Sleep: sleepTime,
- },
- }
-
- for _, tc := range tests {
- testCaseCheck(tc, t)
- }
-}
diff --git a/api/test/e2enew/schema/plugin_test.go b/api/test/e2e/schema/plugin_test.go
similarity index 97%
rename from api/test/e2enew/schema/plugin_test.go
rename to api/test/e2e/schema/plugin_test.go
index 111ecda..f621e08 100644
--- a/api/test/e2enew/schema/plugin_test.go
+++ b/api/test/e2e/schema/plugin_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Plugin List", func() {
diff --git a/api/test/e2enew/schema/schema_suite_test.go b/api/test/e2e/schema/schema_suite_test.go
similarity index 100%
rename from api/test/e2enew/schema/schema_suite_test.go
rename to api/test/e2e/schema/schema_suite_test.go
diff --git a/api/test/e2enew/schema/schema_test.go b/api/test/e2e/schema/schema_test.go
similarity index 98%
rename from api/test/e2enew/schema/schema_test.go
rename to api/test/e2e/schema/schema_test.go
index 05127f4..8dacca8 100644
--- a/api/test/e2enew/schema/schema_test.go
+++ b/api/test/e2e/schema/schema_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Schema Test", func() {
diff --git a/api/test/e2enew/server_info/server_info_suite_test.go b/api/test/e2e/server_info/server_info_suite_test.go
similarity index 95%
rename from api/test/e2enew/server_info/server_info_suite_test.go
rename to api/test/e2e/server_info/server_info_suite_test.go
index b3ac2f0..ac0c3b2 100644
--- a/api/test/e2enew/server_info/server_info_suite_test.go
+++ b/api/test/e2e/server_info/server_info_suite_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestRoute(t *testing.T) {
diff --git a/api/test/e2enew/server_info/server_info_test.go b/api/test/e2e/server_info/server_info_test.go
similarity index 98%
rename from api/test/e2enew/server_info/server_info_test.go
rename to api/test/e2e/server_info/server_info_test.go
index 2405af7..61c2c6b 100644
--- a/api/test/e2enew/server_info/server_info_test.go
+++ b/api/test/e2e/server_info/server_info_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("server info test", func() {
diff --git a/api/test/e2enew/service/service_suite_test.go b/api/test/e2e/service/service_suite_test.go
similarity index 95%
rename from api/test/e2enew/service/service_suite_test.go
rename to api/test/e2e/service/service_suite_test.go
index c4c8f5f..3bbdbda 100644
--- a/api/test/e2enew/service/service_suite_test.go
+++ b/api/test/e2e/service/service_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestRoute(t *testing.T) {
diff --git a/api/test/e2enew/service/service_test.go b/api/test/e2e/service/service_test.go
similarity index 99%
rename from api/test/e2enew/service/service_test.go
rename to api/test/e2e/service/service_test.go
index 39643d9..0531e4d 100644
--- a/api/test/e2enew/service/service_test.go
+++ b/api/test/e2e/service/service_test.go
@@ -26,7 +26,7 @@
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("create service without plugin", func() {
diff --git a/api/test/e2enew/ssl/ssl_suite_test.go b/api/test/e2e/ssl/ssl_suite_test.go
similarity index 95%
rename from api/test/e2enew/ssl/ssl_suite_test.go
rename to api/test/e2e/ssl/ssl_suite_test.go
index a7723e1..bd41036 100644
--- a/api/test/e2enew/ssl/ssl_suite_test.go
+++ b/api/test/e2e/ssl/ssl_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestSSL(t *testing.T) {
diff --git a/api/test/e2enew/ssl/ssl_test.go b/api/test/e2e/ssl/ssl_test.go
similarity index 99%
rename from api/test/e2enew/ssl/ssl_test.go
rename to api/test/e2e/ssl/ssl_test.go
index e201982..eee4f09 100644
--- a/api/test/e2enew/ssl/ssl_test.go
+++ b/api/test/e2e/ssl/ssl_test.go
@@ -30,7 +30,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("SSL Basic", func() {
diff --git a/api/test/e2enew/stream_route/stream_route_suite_test.go b/api/test/e2e/stream_route/stream_route_suite_test.go
similarity index 95%
rename from api/test/e2enew/stream_route/stream_route_suite_test.go
rename to api/test/e2e/stream_route/stream_route_suite_test.go
index 5c752c4..ba40333 100644
--- a/api/test/e2enew/stream_route/stream_route_suite_test.go
+++ b/api/test/e2e/stream_route/stream_route_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestStreamRoute(t *testing.T) {
diff --git a/api/test/e2enew/stream_route/stream_route_test.go b/api/test/e2e/stream_route/stream_route_test.go
similarity index 99%
rename from api/test/e2enew/stream_route/stream_route_test.go
rename to api/test/e2e/stream_route/stream_route_test.go
index 9ca39ba..9d8aa43 100644
--- a/api/test/e2enew/stream_route/stream_route_test.go
+++ b/api/test/e2e/stream_route/stream_route_test.go
@@ -27,7 +27,7 @@
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = Describe("Stream Route", func() {
diff --git a/api/test/e2enew/system_config/system_config_suite_test.go b/api/test/e2e/system_config/system_config_suite_test.go
similarity index 100%
rename from api/test/e2enew/system_config/system_config_suite_test.go
rename to api/test/e2e/system_config/system_config_suite_test.go
diff --git a/api/test/e2enew/system_config/system_config_test.go b/api/test/e2e/system_config/system_config_test.go
similarity index 98%
rename from api/test/e2enew/system_config/system_config_test.go
rename to api/test/e2e/system_config/system_config_test.go
index 7fc2166..37acbf4 100644
--- a/api/test/e2enew/system_config/system_config_test.go
+++ b/api/test/e2e/system_config/system_config_test.go
@@ -22,7 +22,7 @@
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = Describe("system config", func() {
diff --git a/api/test/e2enew/trace/route_with_skywalking_test.go b/api/test/e2e/trace/route_with_skywalking_test.go
similarity index 98%
rename from api/test/e2enew/trace/route_with_skywalking_test.go
rename to api/test/e2e/trace/route_with_skywalking_test.go
index 5c50e4f..a7e9579 100644
--- a/api/test/e2enew/trace/route_with_skywalking_test.go
+++ b/api/test/e2e/trace/route_with_skywalking_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/stretchr/testify/assert"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Route", func() {
diff --git a/api/test/e2enew/trace/trace_suite_test.go b/api/test/e2e/trace/trace_suite_test.go
similarity index 100%
rename from api/test/e2enew/trace/trace_suite_test.go
rename to api/test/e2e/trace/trace_suite_test.go
diff --git a/api/test/e2enew/upstream/upstream_chash_hash_on_test.go b/api/test/e2e/upstream/upstream_chash_hash_on_test.go
similarity index 99%
rename from api/test/e2enew/upstream/upstream_chash_hash_on_test.go
rename to api/test/e2e/upstream/upstream_chash_hash_on_test.go
index 78e7ad0..f952af7 100644
--- a/api/test/e2enew/upstream/upstream_chash_hash_on_test.go
+++ b/api/test/e2e/upstream/upstream_chash_hash_on_test.go
@@ -26,7 +26,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var nodes []map[string]interface{} = []map[string]interface{}{
diff --git a/api/test/e2enew/upstream/upstream_chash_query_string_arg_xxx_test.go b/api/test/e2e/upstream/upstream_chash_query_string_arg_xxx_test.go
similarity index 99%
rename from api/test/e2enew/upstream/upstream_chash_query_string_arg_xxx_test.go
rename to api/test/e2e/upstream/upstream_chash_query_string_arg_xxx_test.go
index 0ffcb26..6f1ff33 100644
--- a/api/test/e2enew/upstream/upstream_chash_query_string_arg_xxx_test.go
+++ b/api/test/e2e/upstream/upstream_chash_query_string_arg_xxx_test.go
@@ -27,7 +27,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var createUpstreamBody map[string]interface{} = map[string]interface{}{
diff --git a/api/test/e2enew/upstream/upstream_keepalive_pool.go b/api/test/e2e/upstream/upstream_keepalive_pool.go
similarity index 98%
rename from api/test/e2enew/upstream/upstream_keepalive_pool.go
rename to api/test/e2e/upstream/upstream_keepalive_pool.go
index 21e8c50..1bfb9f3 100644
--- a/api/test/e2enew/upstream/upstream_keepalive_pool.go
+++ b/api/test/e2e/upstream/upstream_keepalive_pool.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
// just test for schema check
diff --git a/api/test/e2enew/upstream/upstream_priority_test.go b/api/test/e2e/upstream/upstream_priority_test.go
similarity index 98%
rename from api/test/e2enew/upstream/upstream_priority_test.go
rename to api/test/e2e/upstream/upstream_priority_test.go
index 628007f..a3163fa 100644
--- a/api/test/e2enew/upstream/upstream_priority_test.go
+++ b/api/test/e2e/upstream/upstream_priority_test.go
@@ -24,7 +24,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
// just test for schema check
diff --git a/api/test/e2enew/upstream/upstream_retry.go b/api/test/e2e/upstream/upstream_retry.go
similarity index 98%
rename from api/test/e2enew/upstream/upstream_retry.go
rename to api/test/e2e/upstream/upstream_retry.go
index 9805624..3372f12 100644
--- a/api/test/e2enew/upstream/upstream_retry.go
+++ b/api/test/e2e/upstream/upstream_retry.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
// just test for schema check
diff --git a/api/test/e2enew/upstream/upstream_suite_test.go b/api/test/e2e/upstream/upstream_suite_test.go
similarity index 95%
rename from api/test/e2enew/upstream/upstream_suite_test.go
rename to api/test/e2e/upstream/upstream_suite_test.go
index 4106d76..430470e 100644
--- a/api/test/e2enew/upstream/upstream_suite_test.go
+++ b/api/test/e2e/upstream/upstream_suite_test.go
@@ -23,7 +23,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
func TestRoute(t *testing.T) {
diff --git a/api/test/e2enew/upstream/upstream_test.go b/api/test/e2e/upstream/upstream_test.go
similarity index 99%
rename from api/test/e2enew/upstream/upstream_test.go
rename to api/test/e2e/upstream/upstream_test.go
index 15a78da..fff7b4d 100644
--- a/api/test/e2enew/upstream/upstream_test.go
+++ b/api/test/e2e/upstream/upstream_test.go
@@ -26,7 +26,7 @@
"github.com/onsi/ginkgo/extensions/table"
"github.com/onsi/gomega"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Upstream", func() {
diff --git a/api/test/e2enew/version/version_suite_test.go b/api/test/e2e/version/version_suite_test.go
similarity index 100%
rename from api/test/e2enew/version/version_suite_test.go
rename to api/test/e2e/version/version_suite_test.go
diff --git a/api/test/e2enew/version/version_test.go b/api/test/e2e/version/version_test.go
similarity index 96%
rename from api/test/e2enew/version/version_test.go
rename to api/test/e2e/version/version_test.go
index 9312840..2e3c3b8 100644
--- a/api/test/e2enew/version/version_test.go
+++ b/api/test/e2e/version/version_test.go
@@ -22,7 +22,7 @@
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/extensions/table"
- "github.com/apisix/manager-api/test/e2enew/base"
+ "github.com/apisix/manager-api/test/e2e/base"
)
var _ = ginkgo.Describe("Version", func() {
diff --git a/api/test/e2enew/go.mod b/api/test/e2enew/go.mod
deleted file mode 100644
index 0d6c7fb..0000000
--- a/api/test/e2enew/go.mod
+++ /dev/null
@@ -1,11 +0,0 @@
-module github.com/apisix/manager-api/test/e2enew
-
-go 1.15
-
-require (
- github.com/gavv/httpexpect/v2 v2.3.1
- github.com/onsi/ginkgo v1.16.5
- github.com/onsi/gomega v1.16.0
- github.com/stretchr/testify v1.7.0
- github.com/tidwall/gjson v1.11.0
-)
diff --git a/api/test/e2enew/go.sum b/api/test/e2enew/go.sum
deleted file mode 100644
index b6d85c7..0000000
--- a/api/test/e2enew/go.sum
+++ /dev/null
@@ -1,168 +0,0 @@
-github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
-github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
-github.com/andybalholm/brotli v1.0.2 h1:JKnhI/XQ75uFBTiuzXpzFrUriDPiZjlOSzh6wXogP0E=
-github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/fasthttp/websocket v1.4.3-rc.6 h1:omHqsl8j+KXpmzRjF8bmzOSYJ8GnS0E3efi1wYT+niY=
-github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc=
-github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU=
-github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
-github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/gavv/httpexpect/v2 v2.3.1 h1:sGLlKMn8AuHS9ztK9Sb7AJ7OxIL8v2PcLdyxfKt1Fo4=
-github.com/gavv/httpexpect/v2 v2.3.1/go.mod h1:yOE8m/aqFYQDNrgprMeXgq4YynfN9h1NgcE1+1suV64=
-github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
-github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
-github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/imkira/go-interpol v1.0.0 h1:HrmLyvOLJyjR0YofMw8QGdCIuYOs4TJUBDNU5sJC09E=
-github.com/imkira/go-interpol v1.0.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
-github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
-github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
-github.com/klauspost/compress v1.12.2 h1:2KCfW3I9M7nSc5wOqXAlW2v2U6v+w6cbjvbfp+OykW8=
-github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
-github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
-github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
-github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
-github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
-github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
-github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
-github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
-github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c=
-github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873 h1:N3Af8f13ooDKcIhsmFT7Z05CStZWu4C7Md0uDEy4q6o=
-github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8=
-github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
-github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/tidwall/gjson v1.11.0 h1:C16pk7tQNiH6VlCrtIXL1w8GaOsi1X3W8KDkE1BuYd4=
-github.com/tidwall/gjson v1.11.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
-github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
-github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
-github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
-github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.27.0 h1:gDefRDL9aqSiwXV6aRW8aSBPs82y4KizSzHrBLf4NDI=
-github.com/valyala/fasthttp v1.27.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA=
-github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
-github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg=
-github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
-github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY=
-github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI=
-github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=
-github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
-github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=
-github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
-github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI=
-github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
-github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
-golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I=
-golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
-golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
-gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e h1:C7q+e9M5nggAvWfVg9Nl66kebKeuJlP3FD58V4RR5wo=
-moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e/go.mod h1:nejbQVfXh96n9dSF6cH3Jsk/QI1Z2oEL7sSI2ifXFNA=