diff --git a/.github/workflows/auto-build-rpm.yml b/.github/workflows/auto-build-rpm.yml index 16b4d813fc..2bd1ff9871 100644 --- a/.github/workflows/auto-build-rpm.yml +++ b/.github/workflows/auto-build-rpm.yml @@ -2,11 +2,11 @@ name: Auto Build RPM on: push: - branches: [master, 'release/**'] + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: [master] + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' diff --git a/.github/workflows/backend-cli-test.yml b/.github/workflows/backend-cli-test.yml index 81f2b6749a..0f7955005a 100644 --- a/.github/workflows/backend-cli-test.yml +++ b/.github/workflows/backend-cli-test.yml @@ -2,13 +2,11 @@ name: Backend CLI Test on: push: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' @@ -17,21 +15,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - etcd: [3.4.14] - services: - etcd: - image: bitnami/etcd:${{ matrix.etcd }} - ports: - - 2379:2379 - - 2380:2380 - env: - ALLOW_NONE_AUTHENTICATION: yes + etcd: [3.4.20] steps: - uses: actions/checkout@v3 with: submodules: recursive + - name: setup go + uses: actions/setup-go@v3 + with: + go-version: '1.19' + - name: cache etcd id: cache-etcd uses: actions/cache@v2 diff --git a/.github/workflows/backend-e2e-test.yml b/.github/workflows/backend-e2e-test.yml index a0977e342d..3aa384e95a 100644 --- a/.github/workflows/backend-e2e-test.yml +++ b/.github/workflows/backend-e2e-test.yml @@ -2,13 +2,11 @@ name: Backend E2E Test on: push: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' @@ -26,102 +24,11 @@ jobs: - name: setup go uses: actions/setup-go@v3 with: - go-version: "1.15" - submodules: recursive + go-version: "1.19" - - 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: docker/setup-buildx-action@v2 - - 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 - - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }} @@ -135,6 +42,8 @@ jobs: 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@0.0.0.0/0:9000@127.0.0.1:9000@' ./api/conf/conf.yaml + - name: download file Dockerfile-apisix working-directory: ./api/test/docker @@ -168,7 +77,7 @@ jobs: 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/.github/workflows/backend-unit-test.yml b/.github/workflows/backend-unit-test.yml index a582231d3e..88d51c8dab 100644 --- a/.github/workflows/backend-unit-test.yml +++ b/.github/workflows/backend-unit-test.yml @@ -2,13 +2,11 @@ name: Backend Unit Test on: push: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' @@ -31,7 +29,7 @@ jobs: - name: setup go uses: actions/setup-go@v3 with: - go-version: "1.15" + go-version: "1.19" - uses: actions/cache@v2 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 126d05dd4c..231ae13b53 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,13 +13,11 @@ name: "CodeQL" on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' schedule: diff --git a/.github/workflows/deploy-with-docker.yml b/.github/workflows/deploy-with-docker.yml index 9da71f4bd1..b6674c13a4 100644 --- a/.github/workflows/deploy-with-docker.yml +++ b/.github/workflows/deploy-with-docker.yml @@ -2,13 +2,11 @@ name: Test and Deploy with Docker on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' diff --git a/.github/workflows/frontend-e2e-test.yml b/.github/workflows/frontend-e2e-test.yml index 218842f888..ac2c923188 100644 --- a/.github/workflows/frontend-e2e-test.yml +++ b/.github/workflows/frontend-e2e-test.yml @@ -2,13 +2,11 @@ name: Frontend e2e test on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' @@ -51,7 +49,7 @@ jobs: - name: Setup golang environment uses: actions/setup-go@v3 with: - go-version: '1.15' + go-version: '1.19' - uses: actions/cache@v2 with: diff --git a/.github/workflows/frontend-plugin-e2e-test.yml b/.github/workflows/frontend-plugin-e2e-test.yml index 08a818d2f4..ab25254b39 100644 --- a/.github/workflows/frontend-plugin-e2e-test.yml +++ b/.github/workflows/frontend-plugin-e2e-test.yml @@ -1,13 +1,11 @@ name: Frontend e2e test for plugin on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' @@ -49,7 +47,7 @@ jobs: - name: Setup golang environment uses: actions/setup-go@v3 with: - go-version: '1.15' + go-version: '1.19' - uses: actions/cache@v2 with: diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index 5c4249f3d4..ea76932e97 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -4,13 +4,11 @@ name: gitLeaks on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index c78940cc35..1dc161201f 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -1,13 +1,11 @@ name: go-lint on: push: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths: - 'api/**' @@ -33,7 +31,7 @@ jobs: - name: setup go uses: actions/setup-go@v3 with: - go-version: '1.15' + go-version: '1.19' - uses: actions/cache@v2 with: diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml index 87e53281cd..4b9fed939d 100644 --- a/.github/workflows/license-checker.yml +++ b/.github/workflows/license-checker.yml @@ -2,11 +2,9 @@ name: License checker on: push: - branches: - - master + branches: [master, 'release/2.13'] pull_request: - branches: - - master + branches: [master, 'release/2.13'] jobs: check-license: diff --git a/.github/workflows/make-build.yaml b/.github/workflows/make-build.yaml index 15730fdb20..a3aceaee16 100644 --- a/.github/workflows/make-build.yaml +++ b/.github/workflows/make-build.yaml @@ -4,13 +4,11 @@ name: make build on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - 'docs/**' @@ -48,7 +46,7 @@ jobs: - name: Setup golang environment uses: actions/setup-go@v3 with: - go-version: '1.15' + go-version: '1.19' - uses: actions/cache@v2 with: diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index 3913004a4e..b5f9534a70 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -2,8 +2,7 @@ name: Release Test on: push: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - '.github/**' - '.git/**' @@ -14,8 +13,7 @@ on: - 'api/internal/core/store/validate_mock.go' - 'api/internal/core/storage/storage_mock.go' pull_request: - branches: - - master + branches: [master, 'release/2.13'] paths-ignore: - '.github/**' - '.git/**' @@ -45,7 +43,7 @@ jobs: - name: setup go uses: actions/setup-go@v3 with: - go-version: '1.15' + go-version: '1.19' - uses: actions/cache@v2 with: diff --git a/.github/workflows/test-frontend-multiple-node-build.yml b/.github/workflows/test-frontend-multiple-node-build.yml index 0836519069..4f3dbc697d 100644 --- a/.github/workflows/test-frontend-multiple-node-build.yml +++ b/.github/workflows/test-frontend-multiple-node-build.yml @@ -6,11 +6,9 @@ name: Test building web in multiple node version # events but only for the master branch on: push: - branches: - - master + branches: [master, 'release/2.13'] pull_request: - branches: - - master + branches: [master, 'release/2.13'] concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 518afa0f82..1b811d4849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ # Table of Contents +- [2.13.1](#2131) - [2.13.0](#2130) - [2.11.0](#2110) - [2.10.1](#2101) @@ -39,6 +40,29 @@ - [1.5.0](#150) - [1.0.0](#100) +# 2.13.1 + +### Core + +- feat: add etcd store auto re-initialize [#2650](https://github.com/apache/apisix-dashboard/pull/2650) + +### Bugfix + +- fix: advance matching in the route create page causes the page to crash [#2440](https://github.com/apache/apisix-dashboard/pull/2440) +- fix: Users can create a Consumer in Dashboard without enabling the plugin [#2442](https://github.com/apache/apisix-dashboard/pull/2442) +- fix: block arbitrary file index [#2497](https://github.com/apache/apisix-dashboard/pull/2497) +- fix: route duplicate ID [#2501](https://github.com/apache/apisix-dashboard/pull/2501) +- fix: add a judgement for last_report_time [#2551](https://github.com/apache/apisix-dashboard/pull/2551) +- fix: drawer components delete plugin not working [#2573](https://github.com/apache/apisix-dashboard/pull/2573) +- fix: plugin_config missing on service exist [#2657](https://github.com/apache/apisix-dashboard/pull/2657) +- fix: ant-table unable to request [#2641](https://github.com/apache/apisix-dashboard/pull/2641) +- fix: change default CSP value [#2601](https://github.com/apache/apisix-dashboard/pull/2601) + +### Test + +- test: remove stale E2E cases [#2475](https://github.com/apache/apisix-dashboard/pull/2475) +- fix: cli test invalid etcd [#2544](https://github.com/apache/apisix-dashboard/pull/2544) + # 2.13.0 This release contains some features and bugfixes, and all the existing functionalities are compatible with Apache APISIX 2.13.x. diff --git a/Dockerfile b/Dockerfile index d83e35713a..f52d24a483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN set -x \ && cd /usr/local/apisix-dashboard && git clean -Xdf \ && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash -FROM golang:1.15 as api-builder +FROM golang:1.19 as api-builder ARG ENABLE_PROXY=false @@ -36,7 +36,7 @@ RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w GOPROXY=https://goproxy.io, && go env -w GO111MODULE=on \ && CGO_ENABLED=0 ./api/build.sh -FROM node:14-alpine as fe-builder +FROM node:16-alpine as fe-builder ARG ENABLE_PROXY=false diff --git a/api/VERSION b/api/VERSION index fb2c0766b7..94f15e9cc3 100644 --- a/api/VERSION +++ b/api/VERSION @@ -1 +1 @@ -2.13.0 +2.13.1 diff --git a/api/cmd/root.go b/api/cmd/root.go index 984f54e1a4..4d3e033615 100644 --- a/api/cmd/root.go +++ b/api/cmd/root.go @@ -17,15 +17,19 @@ package cmd import ( + "context" "fmt" "os" "os/signal" "syscall" + "time" "github.com/spf13/cobra" "github.com/apisix/manager-api/internal/conf" "github.com/apisix/manager-api/internal/core/server" + "github.com/apisix/manager-api/internal/core/storage" + "github.com/apisix/manager-api/internal/core/store" "github.com/apisix/manager-api/internal/log" ) @@ -66,6 +70,9 @@ func manageAPI() error { errSig := make(chan error, 5) s.Start(errSig) + // start etcd connection checker + stopEtcdConnectionChecker := etcdConnectionChecker() + // Signal received to the process externally. quit := make(chan os.Signal, 1) signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) @@ -73,6 +80,7 @@ func manageAPI() error { select { case sig := <-quit: log.Infof("The Manager API server receive %s and start shutting down", sig.String()) + stopEtcdConnectionChecker() s.Stop() log.Infof("See you next time!") case err := <-errSig: @@ -81,3 +89,59 @@ func manageAPI() error { } return nil } + +func etcdConnectionChecker() context.CancelFunc { + ctx, cancel := context.WithCancel(context.TODO()) + unavailableTimes := 0 + + go func() { + etcdClient := storage.GenEtcdStorage().GetClient() + for { + select { + case <-time.Tick(10 * time.Second): + sCtx, sCancel := context.WithTimeout(ctx, 5*time.Second) + err := etcdClient.Sync(sCtx) + sCancel() + if err != nil { + unavailableTimes++ + log.Errorf("etcd connection loss detected, times: %d", unavailableTimes) + continue + } + + // After multiple failures, the connection is restored + if unavailableTimes >= 1 { + log.Warnf("etcd connection recovered, but after several connection losses, reinitializing stores, times: %d", unavailableTimes) + unavailableTimes = 0 + + // When this happens, force a full re-initialization of the store + store.RangeStore(func(key store.HubKey, store *store.GenericStore) bool { + log.Warnf("etcd store reinitializing: resource: %s", key) + if err := store.Init(); err != nil { + log.Errorf("etcd store reinitialize failed: resource: %s, error: %s", key, err) + } + return true + }) + } else { + log.Info("etcd connection is fine") + } + case <-ctx.Done(): + return + } + } + }() + + // Timed re-initialization when etcd watch actively exits + go func() { + for { + select { + case <-time.Tick(2 * time.Minute): + err := store.ReInit() + if err != nil { + log.Errorf("resource re-initialize failed, err: %v", err) + } + } + } + }() + + return cancel +} diff --git a/api/conf/conf.yaml b/api/conf/conf.yaml index 84e1f3aba7..23c9df8f63 100644 --- a/api/conf/conf.yaml +++ b/api/conf/conf.yaml @@ -66,7 +66,7 @@ conf: # access_control_allow_headers: "Authorization" # access_control-allow_methods: "*" # x_frame_options: "deny" - # content_security_policy: ""default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'"" + # content_security_policy: "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" authentication: diff --git a/api/go.mod b/api/go.mod index 691ecfc074..723faba3b7 100644 --- a/api/go.mod +++ b/api/go.mod @@ -2,44 +2,28 @@ module github.com/apisix/manager-api go 1.15 -replace google.golang.org/grpc => google.golang.org/grpc v1.26.0 - -replace github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.5 - require ( - github.com/coreos/bbolt v1.3.2 // indirect - github.com/coreos/etcd v3.3.25+incompatible // indirect - github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect - github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect - github.com/dustin/go-humanize v1.0.0 // indirect github.com/evanphx/json-patch/v5 v5.1.0 github.com/getkin/kin-openapi v0.33.0 github.com/gin-contrib/gzip v0.0.3 github.com/gin-contrib/static v0.0.0-20200916080430-d45d9a37d28e github.com/gin-gonic/gin v1.6.3 github.com/golang-jwt/jwt v3.2.2+incompatible - github.com/google/uuid v1.2.0 // indirect - github.com/gorilla/websocket v1.4.2 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 // indirect - github.com/jonboulle/clockwork v0.2.2 // indirect - github.com/prometheus/client_golang v1.8.0 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/kr/pretty v0.2.0 // indirect github.com/satori/go.uuid v1.2.0 github.com/shiningrush/droplet v0.2.6-0.20210127040147-53817015cd1b github.com/shiningrush/droplet/wrapper/gin v0.2.1 - github.com/sirupsen/logrus v1.7.0 // indirect github.com/sony/sonyflake v1.0.0 - github.com/spf13/cobra v0.0.3 + github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.8.1 github.com/stretchr/testify v1.7.0 github.com/tidwall/gjson v1.6.7 - github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966 // indirect github.com/xeipuuv/gojsonschema v1.2.0 github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da - go.etcd.io/etcd v3.3.25+incompatible + go.etcd.io/etcd/client/pkg/v3 v3.5.5 + go.etcd.io/etcd/client/v3 v3.5.5 go.uber.org/zap v1.17.0 - golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect - golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect - golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 // indirect - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect + golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect + google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90 // indirect ) diff --git a/api/go.sum b/api/go.sum index 38aa782bd6..b200428693 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,3 +1,4 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -38,80 +39,58 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/etcd v3.3.25+incompatible h1:0GQEw6h3YnuOVdtwygkIfJ+Omx0tZ8/QkVyXI4LkbeY= -github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch/v5 v5.1.0 h1:B0aXl1o/1cP8NbviYiBMkcHBtUjIJ1/Ccg6b+SwCLQg= github.com/evanphx/json-patch/v5 v5.1.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -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/getkin/kin-openapi v0.33.0 h1:KccukV3/1h95R0OP7vfWB3KVy9lxA5i8i3BwlA3tRpE= @@ -132,7 +111,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -151,22 +130,16 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.3.0 h1:nZU+7q+yJoFmwvNgv/LnPUkwPal62+b2xXj0AU1Es7o= github.com/go-playground/validator/v10 v10.3.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -194,9 +167,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -208,8 +179,10 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/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-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -226,31 +199,15 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -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/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -261,7 +218,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -271,23 +227,14 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= @@ -298,23 +245,21 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -322,12 +267,9 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -347,81 +289,36 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -430,37 +327,27 @@ github.com/shiningrush/droplet v0.2.6-0.20210127040147-53817015cd1b h1:kAS+hyJuH github.com/shiningrush/droplet v0.2.6-0.20210127040147-53817015cd1b/go.mod h1:akW2vIeamvMD6zj6wIBfzYn6StGXBxwlW3gA+hcHu5M= github.com/shiningrush/droplet/wrapper/gin v0.2.1 h1:1o+5KUF2sKsdZ7SkmOC5ahAP1qaZKqnm0c5hOYFV6YQ= github.com/shiningrush/droplet/wrapper/gin v0.2.1/go.mod h1:cx5BfLuStFDFIKuEOc1zBTpiT3B4Ezkg3MdlP6rW51I= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sony/sonyflake v1.0.0 h1:MpU6Ro7tfXwgn2l5eluf9xQvQJDROTBImNCfRXn/YeM= github.com/sony/sonyflake v1.0.0/go.mod h1:Jv3cfhf/UFtolOTTRd3q4Nl6ENqM+KfyZ5PseKfZGF4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -479,23 +366,16 @@ github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966 h1:j6JEOq5QWFker+d7mFQYOhjTZonQ7YkLTHm56dbn+yM= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= 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.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -503,18 +383,15 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da h1:NimzV1aGyq29m5ukMK0AMWEhFaL/lrEOaephfuoiARg= github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v3.3.25+incompatible h1:V1RzkZJj9LqsJRy+TUBgpWSbZXITLB819lstuTFoZOY= -go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -522,18 +399,11 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -541,12 +411,9 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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 h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -557,9 +424,9 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -583,13 +450,11 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -600,7 +465,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -608,7 +472,6 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -624,8 +487,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -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/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -650,12 +513,10 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -667,12 +528,9 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -684,7 +542,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -695,22 +552,24 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -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/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -718,16 +577,13 @@ 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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/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/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -742,8 +598,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -752,7 +606,6 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -783,9 +636,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -808,7 +659,7 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -820,7 +671,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -837,7 +687,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -857,10 +706,32 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90 h1:4SPz2GL2CXJt28MTF8V6Ap/9ZiVbQlJeGSd9qtA7DLs= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 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= @@ -872,27 +743,20 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -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/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= 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.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -903,8 +767,9 @@ 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/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -915,7 +780,4 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/api/internal/conf/conf.go b/api/internal/conf/conf.go index 20074238fc..4093a7e51a 100644 --- a/api/internal/conf/conf.go +++ b/api/internal/conf/conf.go @@ -39,6 +39,8 @@ const ( EnvTEST = "test" WebDir = "html/" + + DefaultCSP = "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:" ) var ( @@ -381,7 +383,7 @@ func initSecurity(conf Security) { if conf != se { SecurityConf = conf if conf.ContentSecurityPolicy == "" { - SecurityConf.ContentSecurityPolicy = "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" + SecurityConf.ContentSecurityPolicy = DefaultCSP } if conf.XFrameOptions == "" { SecurityConf.XFrameOptions = "deny" @@ -391,6 +393,6 @@ func initSecurity(conf Security) { SecurityConf = Security{ XFrameOptions: "deny", - ContentSecurityPolicy: "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'", + ContentSecurityPolicy: DefaultCSP, } } diff --git a/api/internal/core/server/store.go b/api/internal/core/server/store.go index 6130a19711..3c13949045 100644 --- a/api/internal/core/server/store.go +++ b/api/internal/core/server/store.go @@ -25,11 +25,11 @@ import ( func (s *server) setupStore() error { if err := storage.InitETCDClient(conf.ETCDConfig); err != nil { - log.Errorf("init etcd client fail: %w", err) + log.Errorf("init etcd client fail: %v", err) return err } if err := store.InitStores(); err != nil { - log.Errorf("init stores fail: %w", err) + log.Errorf("init stores fail: %v", err) return err } return nil diff --git a/api/internal/core/storage/etcd.go b/api/internal/core/storage/etcd.go index 210a65a17e..ff90983673 100644 --- a/api/internal/core/storage/etcd.go +++ b/api/internal/core/storage/etcd.go @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package storage import ( @@ -21,8 +22,8 @@ import ( "fmt" "time" - "go.etcd.io/etcd/clientv3" - "go.etcd.io/etcd/pkg/transport" + "go.etcd.io/etcd/client/pkg/v3/transport" + clientv3 "go.etcd.io/etcd/client/v3" "github.com/apisix/manager-api/internal/conf" "github.com/apisix/manager-api/internal/log" @@ -45,11 +46,12 @@ const ( ) var ( - Client *clientv3.Client + etcdClient *clientv3.Client ) type EtcdV3Storage struct { - client *clientv3.Client + closing bool + client *clientv3.Client } func InitETCDClient(etcdConf *conf.Etcd) error { @@ -80,47 +82,19 @@ func InitETCDClient(etcdConf *conf.Etcd) error { return fmt.Errorf("init etcd failed: %s", err) } - Client = cli + etcdClient = cli utils.AppendToClosers(Close) return nil } func GenEtcdStorage() *EtcdV3Storage { return &EtcdV3Storage{ - client: Client, + client: etcdClient, } } -func NewETCDStorage(etcdConf *conf.Etcd) (*EtcdV3Storage, error) { - cli, err := clientv3.New(clientv3.Config{ - Endpoints: etcdConf.Endpoints, - DialTimeout: 5 * time.Second, - Username: etcdConf.Username, - Password: etcdConf.Password, - }) - if err != nil { - log.Errorf("init etcd failed: %s", err) - return nil, fmt.Errorf("init etcd failed: %s", err) - } - - s := &EtcdV3Storage{ - client: cli, - } - - utils.AppendToClosers(s.Close) - return s, nil -} - func Close() error { - if err := Client.Close(); err != nil { - log.Errorf("etcd client close failed: %s", err) - return err - } - return nil -} - -func (s *EtcdV3Storage) Close() error { - if err := s.client.Close(); err != nil { + if err := etcdClient.Close(); err != nil { log.Errorf("etcd client close failed: %s", err) return err } @@ -210,6 +184,12 @@ func (s *EtcdV3Storage) Watch(ctx context.Context, key string) <-chan WatchRespo go func() { defer runtime.HandlePanic() for event := range eventChan { + if event.Err() != nil { + log.Errorf("etcd watch error: key: %s err: %v", key, event.Err()) + close(ch) + return + } + output := WatchResponse{ Canceled: event.Canceled, } @@ -253,3 +233,7 @@ func (s *EtcdV3Storage) Watch(ctx context.Context, key string) <-chan WatchRespo return ch } + +func (s *EtcdV3Storage) GetClient() *clientv3.Client { + return s.client +} diff --git a/api/internal/core/store/store.go b/api/internal/core/store/store.go index 53c5f22902..b75f406dda 100644 --- a/api/internal/core/store/store.go +++ b/api/internal/core/store/store.go @@ -36,6 +36,10 @@ import ( "github.com/apisix/manager-api/internal/utils/runtime" ) +var ( + storeNeedReInit = make([]*GenericStore, 0) +) + type Pagination struct { PageSize int `json:"page_size" form:"page_size" auto_read:"page_size"` PageNumber int `json:"page" form:"page" auto_read:"page"` @@ -51,12 +55,14 @@ type Interface interface { } type GenericStore struct { - Stg storage.Interface + Stg storage.Interface + initLock sync.Mutex cache sync.Map opt GenericStoreOption - cancel context.CancelFunc + cancel context.CancelFunc + closing bool } type GenericStoreOption struct { @@ -97,53 +103,21 @@ func NewGenericStore(opt GenericStoreOption) (*GenericStore, error) { return s, nil } -func (s *GenericStore) Init() error { - lc, lcancel := context.WithTimeout(context.TODO(), 5*time.Second) - defer lcancel() - ret, err := s.Stg.List(lc, s.opt.BasePath) - if err != nil { - return err - } - for i := range ret { - key := ret[i].Key[len(s.opt.BasePath)+1:] - objPtr, err := s.StringToObjPtr(ret[i].Value, key) - if err != nil { - _, _ = fmt.Fprintln(os.Stderr, "Error occurred while initializing logical store: ", s.opt.BasePath) +func ReInit() error { + for _, store := range storeNeedReInit { + if err := store.Init(); err != nil { return err } - - s.cache.Store(s.opt.KeyFunc(objPtr), objPtr) } - - c, cancel := context.WithCancel(context.TODO()) - ch := s.Stg.Watch(c, s.opt.BasePath) - go func() { - defer runtime.HandlePanic() - for event := range ch { - if event.Canceled { - log.Warnf("watch failed: %s", event.Error) - } - - for i := range event.Events { - switch event.Events[i].Type { - case storage.EventTypePut: - key := event.Events[i].Key[len(s.opt.BasePath)+1:] - objPtr, err := s.StringToObjPtr(event.Events[i].Value, key) - if err != nil { - log.Warnf("value convert to obj failed: %s", err) - continue - } - s.cache.Store(key, objPtr) - case storage.EventTypeDelete: - s.cache.Delete(event.Events[i].Key[len(s.opt.BasePath)+1:]) - } - } - } - }() - s.cancel = cancel return nil } +func (s *GenericStore) Init() error { + s.initLock.Lock() + defer s.initLock.Unlock() + return s.listAndWatch() +} + func (s *GenericStore) Type() HubKey { return s.opt.HubKey } @@ -357,7 +331,68 @@ func (s *GenericStore) BatchDelete(ctx context.Context, keys []string) error { return s.Stg.BatchDelete(ctx, storageKeys) } +func (s *GenericStore) listAndWatch() error { + lc, lcancel := context.WithTimeout(context.TODO(), 5*time.Second) + defer lcancel() + ret, err := s.Stg.List(lc, s.opt.BasePath) + if err != nil { + return err + } + for i := range ret { + key := ret[i].Key[len(s.opt.BasePath)+1:] + objPtr, err := s.StringToObjPtr(ret[i].Value, key) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "Error occurred while initializing logical store: %s, err: %v", s.opt.BasePath, err) + return err + } + + s.cache.Store(s.opt.KeyFunc(objPtr), objPtr) + } + + // start watch + s.cancel = s.watch() + + return nil +} + +func (s *GenericStore) watch() context.CancelFunc { + c, cancel := context.WithCancel(context.TODO()) + ch := s.Stg.Watch(c, s.opt.BasePath) + go func() { + defer func() { + if !s.closing { + log.Errorf("etcd watch exception closed, restarting: resource: %s", s.Type()) + storeNeedReInit = append(storeNeedReInit, s) + } + }() + defer runtime.HandlePanic() + for event := range ch { + if event.Canceled { + log.Warnf("etcd watch failed: %s", event.Error) + return + } + + for i := range event.Events { + switch event.Events[i].Type { + case storage.EventTypePut: + key := event.Events[i].Key[len(s.opt.BasePath)+1:] + objPtr, err := s.StringToObjPtr(event.Events[i].Value, key) + if err != nil { + log.Warnf("value convert to obj failed: %s", err) + continue + } + s.cache.Store(key, objPtr) + case storage.EventTypeDelete: + s.cache.Delete(event.Events[i].Key[len(s.opt.BasePath)+1:]) + } + } + } + }() + return cancel +} + func (s *GenericStore) Close() error { + s.closing = true s.cancel() return nil } diff --git a/api/internal/filter/invalid_request.go b/api/internal/filter/invalid_request.go new file mode 100644 index 0000000000..8c1ebc5cc5 --- /dev/null +++ b/api/internal/filter/invalid_request.go @@ -0,0 +1,41 @@ +/* + * 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 filter + +import ( + "net/url" + "strings" + + "github.com/gin-gonic/gin" +) + +// InvalidRequest provides a filtering mechanism for illegitimate requests +func InvalidRequest() gin.HandlerFunc { + return func(c *gin.Context) { + if !checkURL(c.Request.URL) { + c.AbortWithStatus(403) + } + c.Next() + } +} + +func checkURL(url *url.URL) bool { + if strings.Contains(url.Path, "..") { + return false + } + return true +} diff --git a/api/internal/filter/invalid_request_test.go b/api/internal/filter/invalid_request_test.go new file mode 100644 index 0000000000..986a79102a --- /dev/null +++ b/api/internal/filter/invalid_request_test.go @@ -0,0 +1,30 @@ +/* + * 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 filter + +import ( + "net/url" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestURLCheck_double_dot(t *testing.T) { + assert.Equal(t, false, checkURL(&url.URL{Path: "../../../etc/hosts"})) + assert.Equal(t, false, checkURL(&url.URL{Path: "/../../../etc/hosts"})) + assert.Equal(t, true, checkURL(&url.URL{Path: "/etc/hosts"})) +} diff --git a/api/internal/handler/data_loader/route_import_test.go b/api/internal/handler/data_loader/route_import_test.go index 81cbad883e..437bce3cc4 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 @@ package data_loader import ( "bytes" "errors" - "github.com/shiningrush/droplet/data" "io/ioutil" "mime/multipart" "net/http" @@ -29,6 +28,8 @@ import ( "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 @@ func ReadFile(t *testing.T, filePath string) []byte { 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/internal/route.go b/api/internal/route.go index 7eddc9c372..6f7e1361be 100644 --- a/api/internal/route.go +++ b/api/internal/route.go @@ -57,8 +57,11 @@ func SetUpRouter() *gin.Engine { } r := gin.New() logger := log.GetLogger(log.AccessLog) - r.Use(gzip.Gzip(gzip.DefaultCompression)) - r.Use(filter.CORS(), filter.RequestId(), filter.IPFilter(), filter.RequestLogHandler(logger), filter.SchemaCheck(), filter.RecoverHandler(), filter.Authentication()) + // security + r.Use(filter.RequestLogHandler(logger), filter.IPFilter(), filter.InvalidRequest(), filter.Authentication()) + + // misc + r.Use(gzip.Gzip(gzip.DefaultCompression), filter.CORS(), filter.RequestId(), filter.SchemaCheck(), filter.RecoverHandler()) r.Use(static.Serve("/", static.LocalFile(filepath.Join(conf.WorkDir, conf.WebDir), false))) r.NoRoute(func(c *gin.Context) { c.File(fmt.Sprintf("%s/index.html", filepath.Join(conf.WorkDir, conf.WebDir))) diff --git a/api/internal/utils/closer.go b/api/internal/utils/closer.go index b6e7d8d1ec..c848a44a49 100644 --- a/api/internal/utils/closer.go +++ b/api/internal/utils/closer.go @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package utils import "log" @@ -29,8 +30,9 @@ func AppendToClosers(c Closer) { } func CloseAll() { + closerLen := len(_closers) for i := range _closers { - if err := _closers[i](); err != nil { + if err := _closers[closerLen-1-i](); err != nil { log.Println(err) } } diff --git a/api/test/docker/Dockerfile b/api/test/docker/Dockerfile index 072960b27c..a079d5ea99 100644 --- a/api/test/docker/Dockerfile +++ b/api/test/docker/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM golang:1.15 AS build-env +FROM golang:1.19 AS build-env WORKDIR /go/src/github.com/apisix/manager-api 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 54e5c3485a..3a41f17da1 100644 --- a/api/test/e2enew/auth/authentication_test.go +++ b/api/test/e2e/auth/authentication_test.go @@ -22,7 +22,7 @@ import ( "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 5f700acfa9..91cfab1e10 100644 --- a/api/test/e2enew/balancer/balancer_suite_test.go +++ b/api/test/e2e/balancer/balancer_suite_test.go @@ -22,7 +22,7 @@ import ( "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 99% rename from api/test/e2enew/balancer/balancer_test.go rename to api/test/e2e/balancer/balancer_test.go index 1e211b8bf4..9ad3ed1b7d 100644 --- a/api/test/e2enew/balancer/balancer_test.go +++ b/api/test/e2e/balancer/balancer_test.go @@ -24,7 +24,7 @@ import ( "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 822212a813..0000000000 --- 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 48f125e40a..e2a414bb9b 100644 --- a/api/test/e2enew/consumer/consumer_suite_test.go +++ b/api/test/e2e/consumer/consumer_suite_test.go @@ -23,7 +23,7 @@ import ( . "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 0b25bccd2e..23db5c47ce 100644 --- a/api/test/e2enew/consumer/consumer_test.go +++ b/api/test/e2e/consumer/consumer_test.go @@ -22,7 +22,7 @@ import ( . "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 7b3d7c6951..d116a414c5 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 @@ import ( . "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 3ea10dc04c..d84db8b7dc 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 @@ import ( . "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 5cf4ee830e..455f2e7b14 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 @@ import ( . "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 99% rename from api/test/e2enew/global_rule/global_rule_test.go rename to api/test/e2e/global_rule/global_rule_test.go index 9459881991..0536d89475 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 @@ import ( . "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 06e51b9683..f02e25db31 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 6f0efecfed..b6d85c7607 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 h1:BHyfKlQyqbsFN5p3Ifn 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/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 96% rename from api/test/e2enew/healthz/healthz_test.go rename to api/test/e2e/healthz/healthz_test.go index 870c1ed09e..4a5550f528 100644 --- a/api/test/e2enew/healthz/healthz_test.go +++ b/api/test/e2e/healthz/healthz_test.go @@ -21,7 +21,7 @@ import ( "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 d6f1b6ab65..0000000000 --- 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 fa15893877..e08ca8740a 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 @@ import ( . "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 be4561f567..b768dafb32 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 @@ import ( . "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 99% 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 8227c769f3..1e155d8fec 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 @@ import ( . "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 779ccb3caf..7a3350d684 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 @@ import ( . "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 54bb30eea5..dc326f5c82 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 @@ import ( . "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 a7d61130ea..0000000000 --- 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 954f72d846..d15bc0135e 100644 --- a/api/test/e2enew/label/label_test.go +++ b/api/test/e2e/label/label_test.go @@ -21,7 +21,7 @@ import ( "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/gzip/gzip_test.go b/api/test/e2e/middlewares/gzip_test.go similarity index 86% rename from api/test/e2enew/gzip/gzip_test.go rename to api/test/e2e/middlewares/gzip_test.go index 5f764ec8dc..f346f10e07 100644 --- a/api/test/e2enew/gzip/gzip_test.go +++ b/api/test/e2e/middlewares/gzip_test.go @@ -14,18 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package gzip +package middlewares_test import ( "net/http" - "github.com/onsi/ginkgo" + . "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() { - ginkgo.It("get index.html", func() { +var _ = Describe("Gzip enable", func() { + It("get index.html", func() { base.RunTestCase(base.HttpTestCase{ Object: base.ManagerApiExpect(), Method: http.MethodGet, diff --git a/api/test/e2e/middlewares/invalid_request_test.go b/api/test/e2e/middlewares/invalid_request_test.go new file mode 100644 index 0000000000..7b6cf438bb --- /dev/null +++ b/api/test/e2e/middlewares/invalid_request_test.go @@ -0,0 +1,42 @@ +/* + * 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 middlewares_test + +import ( + "net/http" + + . "github.com/onsi/ginkgo" + + "github.com/apisix/manager-api/test/e2e/base" +) + +var _ = Describe("Invalid Request", func() { + It("double dot in URL path (arbitrary file index)", func() { + base.RunTestCase(base.HttpTestCase{ + Object: base.ManagerApiExpect(), + Method: http.MethodGet, + Path: "/../../../../etc/hosts", + ExpectStatus: http.StatusForbidden, + }) + base.RunTestCase(base.HttpTestCase{ + Object: base.ManagerApiExpect(), + Method: http.MethodGet, + Path: "/.%2e/%2e%2e/../etc/hosts", + ExpectStatus: http.StatusForbidden, + }) + }) +}) diff --git a/api/test/e2enew/gzip/gzip_suite_test.go b/api/test/e2e/middlewares/middlewares_suite_test.go similarity index 90% rename from api/test/e2enew/gzip/gzip_suite_test.go rename to api/test/e2e/middlewares/middlewares_suite_test.go index 13380cf065..0bdcebba07 100644 --- a/api/test/e2enew/gzip/gzip_suite_test.go +++ b/api/test/e2e/middlewares/middlewares_suite_test.go @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package gzip_test +package middlewares_test import ( "testing" @@ -23,7 +23,7 @@ import ( . "github.com/onsi/gomega" ) -func TestGzip(t *testing.T) { +func TestMiddlewares(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "gzip suite") + RunSpecs(t, "Middlewares Suite") } 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 12acaa3945..9f62421779 100644 --- a/api/test/e2enew/migrate/migrate_suite_test.go +++ b/api/test/e2e/migrate/migrate_suite_test.go @@ -24,7 +24,7 @@ import ( . "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 c3ff88dfe3..79f3929daa 100644 --- a/api/test/e2enew/migrate/migrate_test.go +++ b/api/test/e2e/migrate/migrate_test.go @@ -29,7 +29,7 @@ import ( . "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 3f082780c8..102ed9eaec 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 @@ import ( "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 4f6981348d..ac01c073da 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 @@ import ( "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 96% rename from api/test/e2enew/proto/proto_suite_test.go rename to api/test/e2e/proto/proto_suite_test.go index ab0b82603b..4386887e2a 100644 --- a/api/test/e2enew/proto/proto_suite_test.go +++ b/api/test/e2e/proto/proto_suite_test.go @@ -23,7 +23,7 @@ import ( "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 0b1698090c..ad5fa4e8ed 100644 --- a/api/test/e2enew/proto/proto_test.go +++ b/api/test/e2e/proto/proto_test.go @@ -23,7 +23,7 @@ import ( "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 71e141a875..36563de3b5 100644 --- a/api/test/e2enew/route/host_test.go +++ b/api/test/e2e/route/host_test.go @@ -22,7 +22,7 @@ import ( . "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 de9923cc11..c3df0d8671 100644 --- a/api/test/e2enew/route/route_export_test.go +++ b/api/test/e2e/route/route_export_test.go @@ -24,7 +24,7 @@ import ( "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 a4b3c45708..4e4591c698 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 @@ import ( "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 ff823746de..9d448282b0 100644 --- a/api/test/e2enew/route/route_suite_test.go +++ b/api/test/e2e/route/route_suite_test.go @@ -23,7 +23,7 @@ import ( "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 acba6cb0db..7fd8d6bb02 100644 --- a/api/test/e2enew/route/route_test.go +++ b/api/test/e2e/route/route_test.go @@ -22,7 +22,7 @@ import ( . "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 c965a34c6f..37d16d68ae 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 @@ import ( "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 79b72e2e98..df81dbbad7 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 @@ import ( "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 dce72f7ecc..c3c8760893 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 @@ import ( "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 85352954f6..0509d43c51 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 @@ import ( "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 af273bd607..8c7c5089cc 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 @@ import ( "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 a25d15c16f..bae972bc9f 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 @@ import ( "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 99% 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 304240fec0..5795f6f863 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 @@ import ( "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 3e8ab1550f..0ebd37125d 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 @@ import ( "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 99% 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 f13e815b51..2f1903bf72 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 @@ import ( "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 5bb43cc176..96f14a468e 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 @@ import ( "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 e2f869520c..39f32d8f8a 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 @@ import ( "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 d8f9b9e9d9..0340359155 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 @@ import ( "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 29e070d89f..28bbd3b497 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 @@ import ( "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 c272fcfaf0..3e1081bbec 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 @@ import ( "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 5a7152c013..723575ac79 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 @@ import ( "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 3043abb484..0000000000 --- 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 219d8d382a..3e9b149785 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 @@ import ( "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 c32e59a3fd..4a3fda83d0 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 @@ import ( "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 a0cc072c71..0000000000 --- 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 111ecda278..f621e08af5 100644 --- a/api/test/e2enew/schema/plugin_test.go +++ b/api/test/e2e/schema/plugin_test.go @@ -22,7 +22,7 @@ import ( "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 05127f4833..8dacca8728 100644 --- a/api/test/e2enew/schema/schema_test.go +++ b/api/test/e2e/schema/schema_test.go @@ -22,7 +22,7 @@ import ( "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 b3ac2f09a3..ac0c3b2ecc 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 @@ import ( "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 2405af7842..61c2c6b233 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 @@ import ( "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 c4c8f5f001..3bbdbda85b 100644 --- a/api/test/e2enew/service/service_suite_test.go +++ b/api/test/e2e/service/service_suite_test.go @@ -23,7 +23,7 @@ import ( "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 39643d9c6e..0531e4d292 100644 --- a/api/test/e2enew/service/service_test.go +++ b/api/test/e2e/service/service_test.go @@ -26,7 +26,7 @@ import ( "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 a7723e1173..bd4103663a 100644 --- a/api/test/e2enew/ssl/ssl_suite_test.go +++ b/api/test/e2e/ssl/ssl_suite_test.go @@ -23,7 +23,7 @@ import ( "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 e201982fc4..eee4f09beb 100644 --- a/api/test/e2enew/ssl/ssl_test.go +++ b/api/test/e2e/ssl/ssl_test.go @@ -30,7 +30,7 @@ import ( "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 96% 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 5c752c42d5..ba4033306e 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 @@ import ( "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 9ca39ba6fd..9d8aa436bf 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 @@ import ( . "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 7fc2166ee0..37acbf4b37 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 @@ import ( . "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 5c50e4f72c..a7e95799cb 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 @@ import ( "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 78e7ad08b9..f952af7ecc 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 @@ import ( "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 0ffcb26d17..6f1ff33414 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 @@ import ( "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 21e8c50346..1bfb9f3200 100644 --- a/api/test/e2enew/upstream/upstream_keepalive_pool.go +++ b/api/test/e2e/upstream/upstream_keepalive_pool.go @@ -23,7 +23,7 @@ import ( "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 99% rename from api/test/e2enew/upstream/upstream_priority_test.go rename to api/test/e2e/upstream/upstream_priority_test.go index 628007fe98..a3163fa982 100644 --- a/api/test/e2enew/upstream/upstream_priority_test.go +++ b/api/test/e2e/upstream/upstream_priority_test.go @@ -24,7 +24,7 @@ import ( "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 98056249ab..3372f129b8 100644 --- a/api/test/e2enew/upstream/upstream_retry.go +++ b/api/test/e2e/upstream/upstream_retry.go @@ -23,7 +23,7 @@ import ( "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 4106d76091..430470e1d0 100644 --- a/api/test/e2enew/upstream/upstream_suite_test.go +++ b/api/test/e2e/upstream/upstream_suite_test.go @@ -23,7 +23,7 @@ import ( "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 15a78da1bd..fff7b4d227 100644 --- a/api/test/e2enew/upstream/upstream_test.go +++ b/api/test/e2e/upstream/upstream_test.go @@ -26,7 +26,7 @@ import ( "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 931284026e..2e3c3b83b3 100644 --- a/api/test/e2enew/version/version_test.go +++ b/api/test/e2e/version/version_test.go @@ -22,7 +22,7 @@ import ( "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 0d6c7fb642..0000000000 --- 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 b6d85c7607..0000000000 --- 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= diff --git a/api/test/shell/cli_test.sh b/api/test/shell/cli_test.sh index 56d783f5a3..101edda1b6 100755 --- a/api/test/shell/cli_test.sh +++ b/api/test/shell/cli_test.sh @@ -36,6 +36,8 @@ LOG_FILE="/usr/local/apisix-dashboard/logs/error.log" ACCESS_LOG_FILE="/usr/local/apisix-dashboard/logs/access.log" SERVICE_NAME="apisix-dashboard" +ETCD_VERSION="3.4.20" + if [[ -f ../.githash ]]; then GITHASH=$(cat ../.githash) if [[ ! $GITHASH =~ ^[a-z0-9]{7}$ ]]; then @@ -76,6 +78,16 @@ stop_dashboard() { sleep $1 } +start_etcd() { + run docker run -d --name etcd -p 2379:2379 -e ALLOW_NONE_AUTHENTICATION=yes bitnami/etcd:${ETCD_VERSION} + [ "$status" -eq 0 ] +} + +stop_etcd() { + run docker stop etcd && docker rm etcd + [ "$status" -eq 0 ] +} + ### Test Case #pre @test "Build and Deploy APISIX Dashboard Manager API" { @@ -91,6 +103,9 @@ stop_dashboard() { cp ./service/apisix-dashboard.service /usr/lib/systemd/system/${SERVICE_NAME}.service run systemctl daemon-reload [ "$status" -eq 0 ] + + # create etcd container + start_etcd } #1 @@ -174,9 +189,9 @@ stop_dashboard() { recover_conf if [[ $KERNEL = "Darwin" ]]; then - sed -i "" 's/127.0.0.1:2379/127.0.0.0:2379/' ${CONF_FILE} + sed -i "" 's/127.0.0.1:2379/0.0.0.0:0/' ${CONF_FILE} else - sed -i 's/127.0.0.1:2379/127.0.0.0:2379/' ${CONF_FILE} + sed -i 's/127.0.0.1:2379/0.0.0.0:0/' ${CONF_FILE} fi start_dashboard 6 @@ -376,7 +391,7 @@ stop_dashboard() { @test "Check etcd mTLS" { recover_conf - run ./etcd-v3.4.14-linux-amd64/etcd --name infra0 --data-dir infra0 \ + run ./etcd-v3.4.20-linux-amd64/etcd --name infra0 --data-dir infra0 \ --client-cert-auth --trusted-ca-file=$(pwd)/test/certs/mtls_ca.pem --cert-file=$(pwd)/test/certs/mtls_server.pem --key-file=$(pwd)/test/certs/mtls_server-key.pem \ --advertise-client-urls https://127.0.0.1:3379 --listen-client-urls https://127.0.0.1:3379 --listen-peer-urls http://127.0.0.1:3380 & @@ -414,7 +429,7 @@ stop_dashboard() { @test "Check etcd bad data" { recover_conf - run ./etcd-v3.4.14-linux-amd64/etcdctl put /apisix/routes/unique1 "{\"id\":}" + run ./etcd-v3.4.20-linux-amd64/etcdctl put /apisix/routes/unique1 "{\"id\":}" [ "$status" -eq 0 ] sleep 2 @@ -422,10 +437,9 @@ stop_dashboard() { run journalctl -u ${SERVICE_NAME}.service -n 30 - [ $(echo "$output" | grep -c "Error occurred while initializing logical store: /apisix/routes") -eq '1' ] - [ $(echo "$output" | grep -c "Error: json unmarshal failed") -eq '1' ] + [ $(echo "$output" | grep -c "Error occurred while initializing logical store: /apisix/routes, err: json unmarshal failed") -eq '1' ] - run ./etcd-v3.4.14-linux-amd64/etcdctl del /apisix/routes/unique1 + run ./etcd-v3.4.20-linux-amd64/etcdctl del /apisix/routes/unique1 [ "$status" -eq 0 ] stop_dashboard 6 @@ -478,7 +492,98 @@ stop_dashboard() { # check response header with custom header run curl -i http://127.0.0.1:9000 -[ $(echo "$output" | grep -c "X-Frame-Options: test") -eq '1' ] + [ $(echo "$output" | grep -c "X-Frame-Options: test") -eq '1' ] + + stop_dashboard 6 +} + +#16 +@test "Check etcd auto re-watch" { + recover_conf + clean_logfile + + # change log level + if [[ $KERNEL = "Darwin" ]]; then + sed -i "" 's/level: warn/level: info/' ${CONF_FILE} + else + sed -i 's/level: warn/level: info/' ${CONF_FILE} + fi + + start_dashboard 15 + + [ "$(grep -c "etcd connection is fine" ${LOG_FILE})" -ge '1' ] + + run docker stop etcd + + sleep 30 + + [ "$(grep -c "etcd connection loss detected" ${LOG_FILE})" -ge '1' ] + + run docker start etcd + + sleep 20 + + [ "$(grep -c "etcd connection recovered" ${LOG_FILE})" -ge '1' ] + [ "$(grep -c "etcd store reinitializing" ${LOG_FILE})" -ge '1' ] + + stop_dashboard 6 +} + +#17 +@test "Check etcd sync auto recovery" { + recover_conf + + sed -i 's/level: warn/level: info/' ${CONF_FILE} + + start_dashboard 15 + + [ "$(grep -c "etcd connection is fine" ${LOG_FILE})" -ge '1' ] + + # stop and remove old etcd container + stop_etcd + + sleep 30 + + [ "$(grep -c "etcd connection loss detected" ${LOG_FILE})" -ge '1' ] + + # create temporary dir for etcd persistence + tmp="$(sudo su - runner sh -c 'mktemp -d')" + + # create etcd other port and enable persistence + # the etcd on a new port for etcdctl access but not for dashboard + run docker run -d --name etcd -p 12379:2379 -e ALLOW_NONE_AUTHENTICATION=yes -v "${tmp}:/bitnami/etcd" bitnami/etcd:${ETCD_VERSION} + [ "$status" -eq 0 ] + + # write some test data + run ./etcd-v3.4.20-linux-amd64/etcdctl --endpoints 127.0.0.1:12379 put /apisix/routes/new1 '{"uri":"/new1","upstream":{"nodes":{"127.0.0.1:80":1},"type":"roundrobin"}}' + [ "$status" -eq 0 ] + run ./etcd-v3.4.20-linux-amd64/etcdctl --endpoints 127.0.0.1:12379 put /apisix/routes/new2 '{"uri":"/new2","upstream":{"nodes":{"127.0.0.1:80":1},"type":"roundrobin"}}' + [ "$status" -eq 0 ] + + stop_etcd + + # create etcd with existence etcd data + run docker run -d --name etcd -p 2379:2379 -e ALLOW_NONE_AUTHENTICATION=yes -v "${tmp}:/bitnami/etcd" bitnami/etcd:${ETCD_VERSION} + [ "$status" -eq 0 ] + + sleep 20 + + [ "$(grep -c "etcd connection recovered" ${LOG_FILE})" -ge '1' ] + [ "$(grep -c "etcd store reinitializing" ${LOG_FILE})" -ge '1' ] + + # wait data reload + sleep 10 + + # access manager api and check routes + run curl http://127.0.0.1:9000/apisix/admin/user/login -H "Content-Type: application/json" -d '{"username":"admin", "password": "admin"}' + token=$(echo "$output" | sed 's/{/\n/g' | sed 's/,/\n/g' | grep "token" | sed 's/:/\n/g' | sed '1d' | sed 's/}//g' | sed 's/"//g') + [ -n "${token}" ] + + run curl -ig -XGET http://127.0.0.1:9000/apisix/admin/routes -i -H "Content-Type: application/json" -H "Authorization: $token" + respCode=$(echo "$output" | sed 's/{/\n/g'| sed 's/,/\n/g' | grep "code" | sed 's/:/\n/g' | sed '1d') + [ "$respCode" = "0" ] + [ "$(echo "$output" | grep -c "/new1")" -eq '1' ] + [ "$(echo "$output" | grep -c "/new2")" -eq '1' ] stop_dashboard 6 } diff --git a/docs/en/latest/config.json b/docs/en/latest/config.json index 09a20403e6..dd7f6e94dc 100644 --- a/docs/en/latest/config.json +++ b/docs/en/latest/config.json @@ -1,5 +1,5 @@ { - "version": "2.13.0", + "version": "2.13.1", "sidebar": [ { "type": "category", diff --git a/docs/en/latest/install.md b/docs/en/latest/install.md index c9e8b53d99..5977de1e10 100644 --- a/docs/en/latest/install.md +++ b/docs/en/latest/install.md @@ -48,7 +48,7 @@ Please replace `` to your configure file path. ```shell # 1. install RPM package -sudo yum install -y https://github.com/apache/apisix-dashboard/releases/download/v2.13/apisix-dashboard-2.13-0.el7.x86_64.rpm +sudo yum install -y https://github.com/apache/apisix-dashboard/releases/download/v2.13.1/apisix-dashboard-2.13.1-0.el7.x86_64.rpm ``` ### Launch diff --git a/web/cypress/integration/consumer/create_and_delete_consumer.spec.js b/web/cypress/integration/consumer/create_and_delete_consumer.spec.js index 75d3f707c9..3dce5e713c 100644 --- a/web/cypress/integration/consumer/create_and_delete_consumer.spec.js +++ b/web/cypress/integration/consumer/create_and_delete_consumer.spec.js @@ -34,6 +34,7 @@ context('Create and Delete Consumer', () => { const data = { consumerName: 'test_consumer', + noPluginsConsumerName: 'no_plugins_consumer', description: 'desc_by_autotest', createConsumerSuccess: 'Create Consumer Successfully', deleteConsumerSuccess: 'Delete Consumer Successfully', @@ -47,6 +48,27 @@ context('Create and Delete Consumer', () => { cy.fixture('data.json').as('data'); }); + it('creates consumer without plugins', function () { + cy.visit('/consumer/list'); + cy.contains('Create').click(); + // basic information + cy.get(selector.username).type(data.noPluginsConsumerName); + cy.get(selector.description).type(data.description); + cy.contains('Next').click(); + + cy.contains('button', 'Next').click(); + cy.contains('button', 'Submit').click(); + cy.get(selector.notification).should('contain', data.createConsumerSuccess); + + cy.contains(data.noPluginsConsumerName) + .should('be.visible') + .siblings() + .contains('Delete') + .click(); + cy.contains('button', 'Confirm').click(); + cy.get(selector.notification).should('contain', data.deleteConsumerSuccess); + }); + it('creates consumer with key-auth', function () { cy.visit('/'); cy.contains('Consumer').click(); @@ -57,13 +79,6 @@ context('Create and Delete Consumer', () => { cy.get(selector.description).type(data.description); cy.contains('Next').click(); - cy.contains('Next').click(); - cy.get(selector.notification).should( - 'contain', - 'Please enable at least one of the following authentication plugin: basic-auth, hmac-auth, jwt-auth, key-auth, ldap-auth, wolf-rbac', - ); - cy.get(selector.notificationCloseIcon).click().should('not.exist'); - // plugin config cy.contains(selector.pluginCard, 'key-auth').within(() => { cy.contains('Enable').click({ diff --git a/web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js b/web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js index 7aa9b3c996..af73c261fb 100644 --- a/web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js +++ b/web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js @@ -30,6 +30,8 @@ context('Delete Plugin List with the Drawer', () => { checkedSwitcher: '.ant-switch-checked', refresh: '.anticon-reload', empty: '.ant-empty-normal', + notification: '.ant-notification-notice', + notificationCloseIcon: '.ant-notification-notice-close', }; const data = { @@ -107,6 +109,57 @@ context('Delete Plugin List with the Drawer', () => { cy.contains('button', 'Confirm').click({ force: true, }); + cy.get(selector.notification).should('contain', 'Delete Plugin Successfully'); + cy.get(selector.notificationCloseIcon).click({ multiple: true }); + cy.get(selector.empty).should('be.visible'); + }); + + it('should delete the plugin with the drawer in the list of plugins', function () { + cy.visit('/plugin/list'); + cy.get(selector.refresh).click(); + cy.contains('Enable').click(); + + cy.contains(data.basicAuthPlugin) + .parents(selector.pluginCardBordered) + .within(() => { + cy.get('button').click({ + force: true, + }); + }); + cy.get(selector.drawer) + .should('be.visible') + .within(() => { + cy.get(selector.disabledSwitcher).click(); + cy.get(selector.checkedSwitcher).should('exist'); + }); + cy.contains('button', 'Submit').click(); + + cy.contains(data.basicAuthPlugin) + .parents(selector.pluginCardBordered) + .within(() => { + cy.get('button').click({ + force: true, + }); + }); + + cy.contains('button', 'Delete').click({ + force: true, + }); + cy.contains('button', 'Confirm').click({ + force: true, + }); + cy.get(selector.notification).should('contain', 'Delete Plugin Successfully'); + cy.get(selector.notificationCloseIcon).click({ multiple: true }); + + cy.contains(data.basicAuthPlugin) + .parents(selector.pluginCardBordered) + .within(() => { + cy.get('button').then(($el) => { + const text = $el.text(); + expect(text).to.eq('Enable'); + }); + }); + cy.visit('/plugin/list'); cy.get(selector.empty).should('be.visible'); }); }); diff --git a/web/cypress/integration/pluginTemplate/create-edit-delete-plugin-template.spec.js b/web/cypress/integration/pluginTemplate/create-edit-delete-plugin-template.spec.js index 8bdf052004..8cda4a74e6 100644 --- a/web/cypress/integration/pluginTemplate/create-edit-delete-plugin-template.spec.js +++ b/web/cypress/integration/pluginTemplate/create-edit-delete-plugin-template.spec.js @@ -49,6 +49,7 @@ context('Create Configure and Delete PluginTemplate', () => { cy.contains('Route').click(); cy.get(selector.empty).should('be.visible'); cy.contains('Advanced').should('be.visible').click(); + cy.contains('Advanced').trigger('mouseover'); cy.contains('Plugin Template Config').should('be.visible').click(); cy.get(selector.empty).should('be.visible'); cy.contains('Create').click(); diff --git a/web/cypress/integration/pluginTemplate/create-plugin-template-with-route.spec.js b/web/cypress/integration/pluginTemplate/create-plugin-template-with-route.spec.js index 8916977629..dc3662f355 100644 --- a/web/cypress/integration/pluginTemplate/create-plugin-template-with-route.spec.js +++ b/web/cypress/integration/pluginTemplate/create-plugin-template-with-route.spec.js @@ -57,6 +57,7 @@ context('Create PluginTemplate Binding To Route', () => { cy.contains('Route').click(); cy.get(selector.empty).should('be.visible'); cy.contains('Advanced').should('be.visible').click(); + cy.contains('Advanced').trigger('mouseover'); cy.contains('Plugin Template Config').should('be.visible').click(); cy.get(selector.empty).should('be.visible'); cy.contains('Create').click(); @@ -121,15 +122,6 @@ context('Create PluginTemplate Binding To Route', () => { }); it('should delete the pluginTemplate successfully', function () { - cy.visit('plugin-template/list'); - - cy.get(selector.refresh).click(); - cy.get(selector.descriptionSelector).type(data.pluginTemplateName); - cy.contains('button', 'Search').click(); - cy.contains(data.pluginTemplateName).siblings().contains('Delete').click(); - cy.contains('button', 'Confirm').click(); - cy.get(selector.notification).should('contain', data.deletePluginTemplateSuccess); - cy.visit('/routes/list'); cy.get(selector.nameSelector).type(data.routeName); cy.contains('Search').click(); @@ -141,5 +133,13 @@ context('Create PluginTemplate Binding To Route', () => { cy.contains('OK').click(); }); cy.get(selector.notification).should('contain', data.deleteRouteSuccess); + + cy.visit('plugin-template/list'); + cy.get(selector.refresh).click(); + cy.get(selector.descriptionSelector).type(data.pluginTemplateName); + cy.contains('button', 'Search').click(); + cy.contains(data.pluginTemplateName).siblings().contains('Delete').click(); + cy.contains('button', 'Confirm').click(); + cy.get(selector.notification).should('contain', data.deletePluginTemplateSuccess); }); }); diff --git a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js index 530cef3b02..f3f737f839 100644 --- a/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js +++ b/web/cypress/integration/route/can-skip-upstream-when-select-service-id.spec.js @@ -30,6 +30,13 @@ context('Can select service_id skip upstream in route', () => { deleteAlert: '.ant-modal-body', notificationCloseIcon: '.ant-notification-close-icon', enable_websocket: '#enable_websocket', + addbtn: '.ant-btn-primary', + selectItem: '.ant-select-item-option-content', + position: '#position', + value: '#value', + operator: '#operator', + rowcard: '.ant-table-row-level-0', + reverse: '#reverse', }; const data = { @@ -45,6 +52,8 @@ context('Can select service_id skip upstream in route', () => { ip1: '127.0.0.1', port0: '7000', weight0: '1', + parameterName: 'text_Parameter', + value: '["1", "2"]', }; beforeEach(() => { @@ -103,12 +112,46 @@ context('Can select service_id skip upstream in route', () => { cy.get(selector.input).should('be.disabled'); cy.contains(data.upstreamName).click(); - cy.contains('None').click({ force: true }); + cy.contains('None').click({ + force: true, + }); cy.contains('Next').click(); cy.contains('Next').click(); cy.contains('Submit').click(); cy.contains('Goto List').click(); }); + it('should Add Advanced Routing Matching Conditions', function () { + cy.visit('/'); + cy.contains('Route').click(); + + cy.get(selector.nameSelector).type(data.routeName); + cy.contains('Search').click(); + cy.contains(data.routeName).siblings().contains('Configure').click(); + cy.get(selector.addbtn).contains('Add').click(); + cy.get(selector.position).click(); + cy.get(selector.selectItem).within(() => { + cy.contains('HTTP Request Header').click(); + }); + cy.get('.ant-form-item-control-input-content > #name').type(data.parameterName); + cy.get(selector.reverse).click(); + cy.get(selector.operator).click(); + cy.get(selector.selectItem).within(() => { + cy.contains('IN').click(); + }); + cy.get(selector.value).type(data.value); + cy.contains('Confirm').click(); + cy.get(selector.rowcard).should('be.visible'); + cy.get(selector.rowcard).get('tr>td').eq(2).contains('true').should('be.visible'); + cy.get(selector.rowcard).contains('Configure').click(); + cy.get(selector.reverse).click(); + cy.contains('Confirm').click(); + cy.get(selector.rowcard).get('tr>td').eq(2).contains('false').should('be.visible'); + cy.contains('Next').click(); + cy.contains('Next').click(); + cy.contains('Next').click(); + cy.contains('Submit').click(); + cy.contains(data.submitSuccess); + }); it('should skip upstream module after service is selected when editing route', function () { cy.visit('/'); diff --git a/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js b/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js index a28bf20a17..aa9f820da4 100755 --- a/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js +++ b/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js @@ -315,9 +315,9 @@ context('Create and Delete Route', () => { .within(() => { cy.contains('OK').click(); }); - cy.get(selector.deleteAlert).within(()=>{ + cy.get(selector.deleteAlert).within(() => { cy.get('.ant-btn-loading-icon').should('be.visible'); - }) + }); cy.get(selector.notification).should('contain', data.deleteRouteSuccess); cy.get(selector.notificationCloseIcon).click(); }); diff --git a/web/cypress/integration/upstream/create_and_edit_upstream_with_no_nodes.spec.js b/web/cypress/integration/upstream/create_and_edit_upstream_with_no_nodes.spec.js index ce15556790..8acc30bd39 100644 --- a/web/cypress/integration/upstream/create_and_edit_upstream_with_no_nodes.spec.js +++ b/web/cypress/integration/upstream/create_and_edit_upstream_with_no_nodes.spec.js @@ -61,9 +61,8 @@ context('Create and Delete Upstream', () => { cy.get(selector.nameSelector).type(data.upstreamName); cy.contains('Search').click(); cy.contains(data.upstreamName).siblings().contains('Configure').click(); - cy.get(selector.upstreamNodeMinus0).should('not.exist'); - cy.contains('button', 'Next').should('not.be.disabled').click(); + cy.contains('button', 'Next').should('not.be.disabled').trigger('mouseover').click(); cy.contains('Submit').click({ force: true, }); diff --git a/web/package.json b/web/package.json index ce0a938324..a91b6ab66f 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "apisix-dashboard", - "version": "2.13.0", + "version": "2.13.1", "private": true, "description": "Dashboard for Apache APISIX", "scripts": { @@ -52,7 +52,7 @@ "dependencies": { "@ant-design/icons": "^4.0.0", "@ant-design/pro-layout": "^6.0.0", - "@ant-design/pro-table": "2.30.1", + "@ant-design/pro-table": "2.30.8", "@antv/x6": "^1.18.5", "@antv/x6-react-components": "^1.1.7", "@monaco-editor/react": "^4.3.1", @@ -84,7 +84,6 @@ "styled-components": "^5.2.1", "umi": "^3.1.2", "umi-request": "^1.0.8", - "url-regex-safe": "^1.0.2", "use-merge-value": "^1.0.1", "uuid": "7.0.3", "yaml": "^1.10.0" diff --git a/web/src/components/Plugin/PluginPage.tsx b/web/src/components/Plugin/PluginPage.tsx index b107c4b2e7..d5301228a0 100644 --- a/web/src/components/Plugin/PluginPage.tsx +++ b/web/src/components/Plugin/PluginPage.tsx @@ -16,7 +16,7 @@ */ import React, { useEffect, useState } from 'react'; import { Anchor, Layout, Card, Button, Form, Select, Alert } from 'antd'; -import { omit, orderBy } from 'lodash'; +import { orderBy, omit } from 'lodash'; import { useIntl } from 'umi'; import PanelSection from '@/components/PanelSection'; @@ -33,7 +33,11 @@ type Props = { schemaType?: PluginComponent.Schema; referPage?: PluginComponent.ReferPage; showSelector?: boolean; - onChange?: (plugins: PluginComponent.Data, plugin_config_id?: string) => void; + onChange?: ( + plugins: PluginComponent.Data, + plugin_config_id?: string, + handleType?: 'edit' | 'delete', + ) => void; }; const PanelSectionStyle = { @@ -281,10 +285,12 @@ const PluginPage: React.FC = ({ ...initialData, [name]: { ...monacoData, disable: !formData.disable }, }; + let handleType = 'edit'; if (shouldDelete === true) { - newPlugins = omit(newPlugins, name); + newPlugins = omit(plugins, name); + handleType = 'delete'; } - onChange(newPlugins, form.getFieldValue('plugin_config_id')); + onChange(newPlugins, form.getFieldValue('plugin_config_id'), handleType); setPlugins(newPlugins); setName(NEVER_EXIST_PLUGIN_FLAG); }} diff --git a/web/src/components/RawDataEditor/RawDataEditor.tsx b/web/src/components/RawDataEditor/RawDataEditor.tsx index 7d13510ace..7fd09bb26d 100644 --- a/web/src/components/RawDataEditor/RawDataEditor.tsx +++ b/web/src/components/RawDataEditor/RawDataEditor.tsx @@ -172,6 +172,7 @@ const RawDataEditor: React.FC = ({ title="" extra={[