Commit Graph

9 Commits

Author SHA1 Message Date
Alessio Treglia a940214a49
testutil cleanup and reorg (#6658)
Prepare migrating testing auxiliary functions from tests
to testutil.

Remove local duplicates on testutil.WriteToNewTempFile().

Always favor testutil.NewTestCaseDir() over ioutil.TempDir().

Add test cases for the testing auxiliary functions.
2020-07-09 14:21:20 +02:00
Alexander Bezobchuk 33decc9779
Remove context param (#6645) 2020-07-08 14:25:02 +00:00
Alexander Bezobchuk 3de1c7d4fd
x/crisis: In-Process CLI Integration Tests (#6634)
* init commit

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-08 08:23:34 +00:00
Alexander Bezobchuk 14d1ee5437
Use Context in Command instead of Argument + Util (#6572)
* Use context

* use PersistentPreRunE

* undo

* use init context

* Update types

* update tests

* implement tests

* Update simapp/cmd/simcli/main.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update simapp/cmd/simcli/main.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/bank/client/cli/tx.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* fix build

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-02 13:02:28 +00:00
Alexander Bezobchuk d5049413ef
Merge PR #6525: x/bank: Refactor CLI & Tests 2020-06-30 16:59:21 -04:00
Aaron Craelius 850419fffd
Tx CLI proto module interface (#5989)
* WIP

* WIP

* WIP on removing x/auth dependency from client/tx

* Revert unneeded changes

* Simplify cli tx UX

* Wire up bank tx REST routes

* Fix assignment issue

* Wire up bank NewSendTxCmd

* fix lint

* revert file

* revert file

* fix simcli

* Refactor AccountRetriever

* Fix build

* Fix build

* Fix build

* Fix integration tests

* Fix tests

* Docs, linting

* Linting

* WIP on all modules

* Implement other module new tx cmd's

* Fix cmd's

* Refactor existing GetTxCmd

* Fix cmd

* Removing deprecated code

* Update ADR 020 & CHANGELOG

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Fix client/tx tests

* Fix mocks

* Fix tests

* Lint fixes

* REST tx migration

* Wire up REST

* Linting

* Update CHANGELOG, docs

* Fix tests

* lint

* Address review feedback

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* group vars

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-21 21:29:34 +00:00
SaReN c211488b0b
x/auth: cli tests (#6152)
* Add cli tests for auth

* Format imports

* Fix auth tests

* Remove keys in validate sign call

* Eliminate defer in tests

* Format imports

* Test commit
2020-05-05 21:16:37 -04:00
SaReN 7e72e5b8a6
Add cli test for slashing (#6102)
Reference: #5951
2020-05-05 15:51:35 +02:00
Alessio Treglia 2414e5bdd4
x/auth: turn sign --validate-sigantures into a standalone command (#6108)
--validate-signatures should not be a flag of the sign command
as the operation performed (transaction signatures verification)
is logically distinct.

cli_test is and has always been an horrible name for package
directory as it's very much Go anti-idiomatic - _test is the
suffix used by test packages, not directories. Plus, CLI test
cases can and should live alongside other testcases that don't
require binaries to be built beforehand. Thus:

x/module/client/cli_test/*.go -> x/module/client/cli/

Test files that require sim{cli,d} shall be tagged with // +build cli_test

With regard to cli test auxiliary functions, they should live in:

x/module/client/testutil/

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-04 13:55:16 +00:00