From 4f990837234946ce2deb8d86e80ee90835a4c3f2 Mon Sep 17 00:00:00 2001 From: Marshall Kim Date: Fri, 25 Sep 2020 16:58:53 +0900 Subject: [PATCH] test: circleci enable (#20) * chore: circleci update * chore: github setup * chore: circleci * fix: fix * chore: circleci * lint: lint * chore: timeout for lint * test: branches * chore: go mod tidy * test: order change --- .circleci/config.yml | 149 ++++++++++++----- .github/CODEOWNERS | 5 - .github/ISSUE_TEMPLATE/bug-report.md | 38 ----- .github/ISSUE_TEMPLATE/feature-request.md | 36 ----- .github/PULL_REQUEST_TEMPLATE.md | 42 ++--- .github/semantic.yml | 2 + .github/stale.yml | 45 ------ .github/workflows/linkchecker.yml | 11 -- .github/workflows/release-sims.yml | 46 ------ .github/workflows/sims.yml | 122 -------------- .github/workflows/test.yml | 188 ---------------------- Makefile | 2 +- baseapp/abci.go | 2 +- go.mod | 4 + go.sum | 18 ++- x/auth/client/cli/query.go | 2 +- 16 files changed, 145 insertions(+), 567 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/semantic.yml delete mode 100644 .github/stale.yml delete mode 100644 .github/workflows/linkchecker.yml delete mode 100644 .github/workflows/release-sims.yml delete mode 100644 .github/workflows/sims.yml delete mode 100644 .github/workflows/test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 30fdd4537c..af6a33d52b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,17 +30,6 @@ commands: make << parameters.target >> jobs: - build-docs: - executor: docs - steps: - - checkout - - run: - name: "Build docs" - command: make build-docs - - run: - name: "Upload docs to S3" - command: make sync-docs - setup-dependencies: executor: golang steps: @@ -69,59 +58,137 @@ jobs: paths: - ".git" + test-sim-nondeterminism: + executor: golang + steps: + - make: + target: test-sim-nondeterminism + description: "Test individual module simulations" + + test-sim-import-export: + executor: golang + steps: + - make: + target: test-sim-import-export + description: "Test application import/export simulation" + + test-sim-after-import: + executor: golang + steps: + - make: + target: test-sim-after-import + description: "Test simulation after import" + + test-sim-multi-seed-long: + executor: golang + steps: + - make: + target: test-sim-multi-seed-long + description: "Test multi-seed simulation (long)" + + test-sim-multi-seed-short: + executor: golang + steps: + - make: + target: test-sim-multi-seed-short + description: "Test multi-seed simulation (short)" + + test-cover: + executor: golang + parallelism: 4 + steps: + - checkout + - restore_cache: + keys: + - go-mod-v2-{{ checksum "go.sum" }} + - run: + name: Run tests + command: | + export VERSION="$(git describe --tags --long | sed 's/v\(.*\)/\1/')" + export GO111MODULE=on + mkdir -p /tmp/logs /tmp/workspace/profiles + for pkg in $(go list ./... | grep -v '/simulation' | circleci tests split); do + id=$(echo "$pkg" | sed 's|[/.]|_|g') + go test -mod=readonly -timeout 8m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg" | tee "/tmp/logs/$id-$RANDOM.log" + done + - persist_to_workspace: + root: /tmp/workspace + paths: + - "profiles/*" + - store_artifacts: + path: /tmp/logs + + update-swagger-docs: + executor: golang + steps: + - make: + target: update-swagger-docs + description: "Check if statik.go is up-to-date" + lint: + executor: golang + steps: + - checkout + - restore_cache: + keys: + - go-mod-v2-{{ checksum "go.sum" }} + - run: + name: lint + command: | + go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.27 + make lint + workflows: version: 2 test-suite: jobs: + - setup-dependencies + - lint: + requires: + - setup-dependencies - update-swagger-docs: requires: - setup-dependencies - - setup-dependencies: - # This filter enables the job for tags - filters: - tags: - only: - - /^v.*/ + - test-cover: + requires: + - setup-dependencies - test-sim-nondeterminism: requires: - setup-dependencies + filters: + branches: + only: + - develop + - /release.*/ - test-sim-import-export: requires: - setup-dependencies + filters: + branches: + only: + - develop + - /release.*/ - test-sim-after-import: requires: - setup-dependencies + filters: + branches: + only: + - develop + - /release.*/ - test-sim-multi-seed-short: requires: - setup-dependencies + filters: + branches: + only: + - develop + - /release.*/ - test-sim-multi-seed-long: requires: - setup-dependencies # These filters ensure that the long sim only runs during release filters: branches: - ignore: /.*/ - tags: only: - - /^v.*/ - - test-cover: - requires: - - setup-dependencies -# - upload-coverage: -# requires: -# - test-cover -# - build-docs: -# context: docs-deployment-master -# filters: -# branches: -# only: -# - docs-theme-latest -# - build-docs: -# context: docs-deployment-release -# filters: -# branches: -# only: -# - master -# tags: -# only: -# - /v.*/ + - develop + - /release.*/ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index c371606b44..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,5 +0,0 @@ -# CODEOWNERS: https://help.github.com/articles/about-codeowners/ - -# Launchpad Stable Release Managers -* @alessio @clevinson @ethanfrey - diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 369cd676cb..0000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us squash bugs! - ---- - - - - - -## Summary of Bug - - - -## Version - - - -## Steps to Reproduce - - - -____ - -## For Admin Use - -- [ ] Not duplicate issue -- [ ] Appropriate labels applied -- [ ] Appropriate contributors tagged -- [ ] Contributor assigned/self-assigned diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 324ab9a8ab..0000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: Feature Request -about: Create a proposal to request a feature - ---- - - - -## Summary - - - -## Problem Definition - - - -## Proposal - - - -____ - -#### For Admin Use - -- [ ] Not duplicate issue -- [ ] Appropriate labels applied -- [ ] Appropriate contributors tagged -- [ ] Contributor assigned/self-assigned diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6dd37f7f28..9363c3f104 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,34 +1,22 @@ - - + Closes: #XXX ## Description + - - -______ - -For contributor use: - -- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) -- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. -- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). -- [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) -- [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`) -- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). -- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` -- [ ] Re-reviewed `Files changed` in the Github PR explorer +## Motivation and context + + -______ +## How has this been tested? + + + -For admin use: +## Checklist: + + +- [ ] I followed the [contributing guidelines](https://github.com/line/link/blob/master/CONTRIBUTING.md). +- [ ] I have updated the documentation accordingly. +- [ ] I have added tests to cover my changes. -- [ ] Added appropriate labels to PR (ex. `WIP`, `R4R`, `docs`, etc) -- [ ] Reviewers assigned -- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr)) diff --git a/.github/semantic.yml b/.github/semantic.yml new file mode 100644 index 0000000000..8631e2b705 --- /dev/null +++ b/.github/semantic.yml @@ -0,0 +1,2 @@ +titleAndCommits: true +allowMergeCommits: true \ No newline at end of file diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 044feb3843..0000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 10 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 4 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - pinned - - security - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: true - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: true - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: pulls - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -pulls: - daysUntilStale: 30 - markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml deleted file mode 100644 index c78daa396f..0000000000 --- a/.github/workflows/linkchecker.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Check links -on: [pull_request] -jobs: - link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Link Checker - uses: peter-evans/link-checker@v1 - with: - args: -v -r * \ No newline at end of file diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml deleted file mode 100644 index bc21f4372e..0000000000 --- a/.github/workflows/release-sims.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Release Sims -on: - pull_request: - branches: - - "rc**" - -jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" - - build: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims')" - steps: - - uses: actions/checkout@v2 - - run: | - make build - install-runsim: - runs-on: ubuntu-latest - needs: build - steps: - - name: install runsim - run: | - export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - - test-sim-multi-seed-long: - runs-on: ubuntu-latest - needs: [build, install-runsim] - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - - name: test-sim-multi-seed-long - run: | - make test-sim-multi-seed-long diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml deleted file mode 100644 index aae840e8eb..0000000000 --- a/.github/workflows/sims.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: Sims -on: [pull_request] -jobs: - cleanup-runs: - runs-on: ubuntu-latest - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - build: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims')" - steps: - - uses: actions/checkout@v2 - - run: | - make build - install-runsim: - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/setup-go@v2-beta - - name: install runsim - run: | - export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - - test-sim-nondeterminism: - runs-on: ubuntu-latest - needs: [build, install-runsim] - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v4 - with: - SUFFIX_FILTER: | - .go - .mod - .sum - SET_ENV_NAME_INSERTIONS: 1 - SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - if: "env.GIT_DIFF != ''" - - name: test-sim-nondeterminism - run: | - make test-sim-nondeterminism - if: "env.GIT_DIFF != ''" - - test-sim-import-export: - runs-on: ubuntu-latest - needs: [build, install-runsim] - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v4 - with: - SUFFIX_FILTER: | - .go - .mod - .sum - SET_ENV_NAME_INSERTIONS: 1 - SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - if: "env.GIT_DIFF != ''" - - name: test-sim-import-export - run: | - make test-sim-import-export - if: "env.GIT_DIFF != ''" - - test-sim-after-import: - runs-on: ubuntu-latest - needs: [build, install-runsim] - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v4 - with: - SUFFIX_FILTER: | - .go - .mod - .sum - SET_ENV_NAME_INSERTIONS: 1 - SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - if: "env.GIT_DIFF != ''" - - name: test-sim-after-import - run: | - make test-sim-after-import - if: "env.GIT_DIFF != ''" - - test-sim-multi-seed-short: - runs-on: ubuntu-latest - needs: [build, install-runsim] - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v4 - with: - SUFFIX_FILTER: | - .go - .mod - .sum - SET_ENV_NAME_INSERTIONS: 1 - SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v1 - with: - path: ~/go/bin - key: ${{ runner.os }}-go-runsim-binary - if: "env.GIT_DIFF != ''" - - name: test-sim-multi-seed-short - run: | - make test-sim-multi-seed-short - if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 558929b4dd..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,188 +0,0 @@ -name: Code Coverage -on: - pull_request: - push: - branches: - - master -jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" - - split-test-files: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Create a file with all the pkgs - run: go list ./... > pkgs.txt - - name: Split pkgs into 4 files - run: split -n l/4 --additional-suffix=.txt ./pkgs.txt - # cache multiple - - uses: actions/upload-artifact@v2 - with: - name: "${{ github.sha }}-aa" - path: ./xaa.txt - - uses: actions/upload-artifact@v2 - with: - name: "${{ github.sha }}-ab" - path: ./xab.txt - - uses: actions/upload-artifact@v2 - with: - name: "${{ github.sha }}-ac" - path: ./xac.txt - - uses: actions/upload-artifact@v2 - with: - name: "${{ github.sha }}-ad" - path: ./xad.txt - - test-coverage-run-1: - runs-on: ubuntu-latest - needs: split-test-files - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v3 - id: git_diff - with: - SUFFIX_FILTER: | - .go - .mod - .sum - - uses: actions/download-artifact@v2 - with: - name: "${{ github.sha }}-aa" - if: "env.GIT_DIFF != ''" - - name: test & coverage report creation - run: | - cat xaa.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' - if: "env.GIT_DIFF != ''" - - name: filter out DONTCOVER - run: | - excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" - excludelist+=" $(find ./ -type f -name '*.pb.go')" - excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')" - for filename in ${excludelist}; do - filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') - echo "Excluding ${filename} from coverage report..." - sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt - done - if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1.0.13 - with: - file: ./coverage.txt - if: "env.GIT_DIFF != ''" - - test-coverage-run-2: - runs-on: ubuntu-latest - needs: split-test-files - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v3 - id: git_diff - with: - SUFFIX_FILTER: | - .go - .mod - .sum - - uses: actions/download-artifact@v2 - with: - name: "${{ github.sha }}-ab" - if: "env.GIT_DIFF != ''" - - name: test & coverage report creation - run: | - cat xab.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' - if: "env.GIT_DIFF != ''" - - name: filter out DONTCOVER - run: | - excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" - excludelist+=" $(find ./ -type f -name '*.pb.go')" - excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')" - for filename in ${excludelist}; do - filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') - echo "Excluding ${filename} from coverage report..." - sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt - done - if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1.0.13 - with: - file: ./coverage.txt - if: "env.GIT_DIFF != ''" - - test-coverage-run-3: - runs-on: ubuntu-latest - needs: split-test-files - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v3 - id: git_diff - with: - SUFFIX_FILTER: | - .go - .mod - .sum - - uses: actions/download-artifact@v2 - with: - name: "${{ github.sha }}-ac" - if: "env.GIT_DIFF != ''" - - name: test & coverage report creation - run: | - cat xac.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' - if: "env.GIT_DIFF != ''" - - name: filter out DONTCOVER - run: | - excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" - excludelist+=" $(find ./ -type f -name '*.pb.go')" - excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')" - for filename in ${excludelist}; do - filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') - echo "Excluding ${filename} from coverage report..." - sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt - done - if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1.0.13 - with: - file: ./coverage.txt - if: "env.GIT_DIFF != ''" - - test-coverage-run-4: - runs-on: ubuntu-latest - needs: split-test-files - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v3 - id: git_diff - with: - SUFFIX_FILTER: | - .go - .mod - .sum - - uses: actions/download-artifact@v2 - with: - name: "${{ github.sha }}-ad" - if: "env.GIT_DIFF != ''" - - name: test & coverage report creation - run: | - cat xad.txt | xargs go test -mod=readonly -timeout 15m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' - if: "env.GIT_DIFF != ''" - - name: filter out DONTCOVER - run: | - excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" - excludelist+=" $(find ./ -type f -name '*.pb.go')" - excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')" - for filename in ${excludelist}; do - filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') - echo "Excluding ${filename} from coverage report..." - sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt - done - if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1.0.13 - with: - file: ./coverage.txt - if: "env.GIT_DIFF != ''" diff --git a/Makefile b/Makefile index 9d857bc8ca..37e18db2d1 100644 --- a/Makefile +++ b/Makefile @@ -175,7 +175,7 @@ test-cover: .PHONY: test-cover lint: golangci-lint - $(BINDIR)/golangci-lint run + $(BINDIR)/golangci-lint run --timeout 120s find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s go mod verify .PHONY: lint diff --git a/baseapp/abci.go b/baseapp/abci.go index 6e8bb68cb7..463be59ef3 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -512,7 +512,7 @@ func checkProvable(req abci.RequestQuery) error { } func processCustomQuerier( - app *BaseApp, cacheMS types.CacheMultiStore, querier sdk.Querier, path []string, req abci.RequestQuery, + app *BaseApp, cacheMS types.CacheMultiStore, querier sdk.Querier, path []string, req abci.RequestQuery, // nolint:interfacer ) abci.ResponseQuery { // cache wrap the commit-multistore for safety diff --git a/go.mod b/go.mod index 30c52e720b..3fa7385700 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,11 @@ require ( github.com/gorilla/handlers v1.4.2 github.com/gorilla/mux v1.7.4 github.com/hashicorp/golang-lru v0.5.4 + github.com/kr/text v0.2.0 // indirect github.com/mattn/go-isatty v0.0.12 + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/onsi/ginkgo v1.12.0 // indirect + github.com/onsi/gomega v1.9.0 // indirect github.com/pelletier/go-toml v1.6.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.6 diff --git a/go.sum b/go.sum index 63224186df..c38f2c7554 100644 --- a/go.sum +++ b/go.sum @@ -83,6 +83,7 @@ github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -250,11 +251,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 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/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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -300,15 +301,20 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE 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/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= 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/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= 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= @@ -530,6 +536,7 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -605,8 +612,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/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= diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index bbca617757..a394500351 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -21,7 +21,7 @@ import ( ) const ( - flagEvents = "events" + flagEvents = "events" flagCheckState = "check_state" eventFormat = "{eventType}.{eventAttribute}={value}"