Commit Graph

93 Commits

Author SHA1 Message Date
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
Marko 218ec99508
various linter fixes (#6106)
x/staking: Fix all linter warnings.

Fixed warnings across base packages.

New linters:
- unparam
- nolintlint

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-05-02 21:26:59 +02:00
SaReN f92f6c9dd1
Add CLI tests for simd, distribution (#6095)
* Added cli integration base setup

* Added cmd to simapp

* Fixed ci-lint issues

* Fixed ci-lint issues

* Addressed changes in Makefile

* Updated simd to latest

* Removed testnet and replay commands

* Modified tx command for simcli

* Did code cleanup

* Removed duplication in Makefile

* Refactored cli_test

* Added build-sim to Makefile

* Added test-cli to circleci

* Added tests for staking txns

* Addressed format issues

* refctored tests code

* Added tests for send, staking

* Removed test_hepers file

* Moved test_cover to contrib

* Added codec in fixtures

* Migrated tests to respective modules

* Exported helper methods

* Moved helpers to bank

* Added codec to fixtures

* Migrated tests to modules

* Removed auth helpers from staking

* Did minor code cleanup

* Added test-cli to Makefile

* Updated github actions

* Did code refactor

* Fixed github actions for cli-test

* Added tests for recover keys and fee deduction

* Did minor code cleanup

* Added build flag to cli_tests

* Moved cli_test to tests

* Modified path in Makefile

* Updated codec std in fixtures

* Added doc for cli tests

* Remove ibc genesis validation

* Fix issue number

* Added missing imports

* Add tests for distribution and simd

* Modified naming for test functions

* Added test for withdraw rewards

* Modified test function names

* Fixed import format

* Migrated helpers to package cli

* Fixed github test actions

* Fixed test coverage in actions

* Added build sim to actions

* Apply Alessio patch for tests

* Removed unused imports

* Added init for go tests

* try fix tests

* goimports what wasn't goimports'd

* try fix ci

* add relevant tags to integration tests

* run integration tests separately

* use go build -o flag and let compiler gemerate the binary with the
right extension for the HOST platform

rename cli-test to test-integration

* update ci

* rename

Co-authored-by: atheesh <atheesh1>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-05-01 20:16:17 +00:00
Alessio Treglia 2879c0702c
x/ibc: fix missing return statement (#6099)
* enable the wsl linter

Fix various wsl-related warnings.

x/ibc/04-channel/keeper/handshake.go: fix missing return statement in ChanOpenTry().

* goimports -w files

* remove unknown linter references

* run make format

* Revert "run make format"

This reverts commit f810b62b9e4993f08506663d4e5f2ec2228a9863.

* run make format
2020-04-29 22:36:34 -04:00
SaReN b854c485e4
Add CLI tests for fee deduction (#6088)
* Added cli integration base setup

* Added cmd to simapp

* Fixed ci-lint issues

* Fixed ci-lint issues

* Addressed changes in Makefile

* Updated simd to latest

* Removed testnet and replay commands

* Modified tx command for simcli

* Did code cleanup

* Removed duplication in Makefile

* Refactored cli_test

* Added build-sim to Makefile

* Added test-cli to circleci

* Added tests for staking txns

* Addressed format issues

* refctored tests code

* Added tests for send, staking

* Removed test_hepers file

* Moved test_cover to contrib

* Added codec in fixtures

* Migrated tests to respective modules

* Exported helper methods

* Moved helpers to bank

* Added codec to fixtures

* Migrated tests to modules

* Removed auth helpers from staking

* Did minor code cleanup

* Added test-cli to Makefile

* Updated github actions

* Did code refactor

* Fixed github actions for cli-test

* Added tests for recover keys and fee deduction

* Did minor code cleanup

* Added build flag to cli_tests

* Moved cli_test to tests

* Modified path in Makefile

* Updated codec std in fixtures

* Added doc for cli tests

* Remove ibc genesis validation

* Fix issue number

* Added missing imports

* Modified naming for test functions

Co-authored-by: atheesh <atheesh1>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: anilCSE <anil@vitwit.com>
2020-04-29 20:46:10 +00:00
SaReN 3b71198b25
Merge PR #6033: Add setup for cli_test 2020-04-29 11:52:30 -04:00
Zach Ramsay b51d5dda8c remove deprecated 'tests/' directory & old D-file 2018-02-13 09:12:23 -05:00
Ethan Frey ff0a50a1b3 Fix cli tests to explicitly pass height when querying results of tx 2017-10-25 19:14:28 +02:00
Ethan Frey 5714b101b5 Handle explicit heights to query tx in basictx.sh 2017-10-25 19:14:28 +02:00
rigelrozanski d3b4d42458 integrated init --static, fix tests 2017-10-10 03:13:02 -04:00
Ethan Frey b11536c579 Move the tests into basecoin examples 2017-09-08 20:51:14 +02:00
rigelrozanski 4ac089f084 json testing, addressed init option PR comments 2017-09-06 01:19:20 -04:00
Rigel Rozanski ab8505d1f6 init options tests 2017-09-06 01:19:20 -04:00
Rigel Rozanski bfd4ce96bb added init option flag and tests 2017-09-06 01:19:20 -04:00
Ethan Frey 96f96ffc3d Moved basecoin into examples 2017-09-04 16:50:09 +02:00
Ethan Frey b274494474 Fix timing issue in rest cli test 2017-09-04 16:50:09 +02:00
Ethan Frey 041396b53e Moved eyes into example apps, cleaned up Makefile 2017-09-04 16:50:09 +02:00
Ethan Frey d22c08b12a Store shunit2 in the repo, no dangerous wget each test 2017-09-04 16:50:09 +02:00
Ethan Frey ce46642aa0 Move counter cli tests into example dir 2017-09-04 16:50:09 +02:00
Ethan Frey 8a430648e4 Bump version to 0.7.0-alpha 2017-08-18 23:48:57 +01:00
Emmanuel Odeke 8a4e24925a Fixed tests/cli/rest.sh for checking accounts 2017-08-18 22:50:10 +01:00
Emmanuel Odeke f52d92a40e modules/coin/rest: implemented CreateRole
* Note: Role must be a hex string, as enforced in tests/rest/cli.sh

```shell
$ curl -X POST http://localhost:8998/build/create_role --data \
'{
  "role":"DEADBEEF", "seq": 1,
  "min_sigs": 1,
  "signers": [{
    "addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9", "app": "role"
  }]
}'
```

```HTTP
HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 08 Aug 2017 19:15:13 GMT
Content-Length: 387

{
  "type": "chain/tx",
  "data": {
    "chain_id": "test_chain_id",
    "expires_at": 0,
    "tx": {
      "type": "role/create",
      "data": {
        "role": "DEADBEEF",
        "min_sigs": 1,
        "signers": [
          {
            "chain": "",
            "app": "role",
            "addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9"
          }
        ]
      }
    }
  }
}
```

Updates #200
2017-08-18 22:32:04 +01:00
Ethan Frey 2b1c4dd8b9 Really renames etc -> eyes... finish the job 2017-08-07 19:21:07 +02:00
Ethan Frey 0133723aca Clean up comments 2017-08-07 18:50:33 +02:00
Ethan Frey 483ed6d87a Add cli tests for eyes query and add to Makefile 2017-08-07 18:50:33 +02:00
Ethan Frey f2adf3645a role cli uses hex for consistency 2017-08-04 14:44:28 +02:00
Ethan Frey 4652779a3d Fix up flag handling 2017-07-29 17:23:21 -04:00
Ethan Frey 8dd2371cc5 Don't require init when --trust-node is given 2017-07-29 17:23:21 -04:00
Ethan Frey b98bfc01ae Add --trust-node flag to cli to skip proofs on queries 2017-07-29 17:23:21 -04:00
Ethan Frey f0e2227ada Use password as key, allow 3 letter names 2017-07-29 17:16:24 -04:00
Ethan Frey 14bb65457c Add cli tests for rest 2017-07-29 17:11:23 -04:00
Ethan Frey 6632d88b3d IBC post packet test passes 2017-07-27 16:41:37 -04:00
Ethan Frey f32e6c9b7d Updated light-client 2017-07-27 16:41:36 -04:00
Ethan Frey e90d6db516 Update seed to a given height 2017-07-27 16:41:13 -04:00
Ethan Frey d0920ac1cf Add post packet to cli and test... bug 2017-07-27 16:41:13 -04:00
Ethan Frey b7abee64f0 Test creating packet and query via cli 2017-07-27 16:41:12 -04:00
Ethan Frey 9640547c01 Expose credit tx to cli and test 2017-07-27 16:41:12 -04:00
Ethan Frey aad5a0f3a0 Test query ibc status and fix bugs 2017-07-27 16:30:20 -04:00
Ethan Frey fd10387eb5 Tested register and update ibc via cli 2017-07-27 16:30:20 -04:00
Ethan Frey 199ee81a97 Revert all on failed CheckTx, fee+nonce increment on failed DeliverTx 2017-07-27 15:31:33 -04:00
Ethan Frey 44f6696f11 Proper tests for accessing a multi-sig account 2017-07-19 16:45:03 +02:00
Ethan Frey 5f1d98ba0f Tested sending 1 sig from role 2017-07-19 16:36:35 +02:00
Ethan Frey 63fc25e74e Add roles cli test, coin query supports multiple apps in actor 2017-07-19 16:14:26 +02:00
Ethan Frey a12d866ed1 --sequence=-1 broken if no sequence yet 2017-07-19 13:27:29 +02:00
rigel rozanski 0a9460dc93 auto-sequencing 2017-07-19 00:13:39 -04:00
Ethan Frey d9c39ff9e6 Bring more cli tests from light-client 2017-07-18 21:46:13 +02:00
rigel rozanski 8dc5fc718d tests working 2017-07-18 12:08:30 +02:00
rigel rozanski cb00c00f0d getting query command to operate 2017-07-18 12:08:30 +02:00
Ethan Frey 71276a53b5 A failing cli test demonstating the missing query nonce command 2017-07-18 12:08:30 +02:00
rigel rozanski 3d5cf393b9 PR changes 2017-07-18 12:08:29 +02:00