Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve tests #1232

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions gno.land/pkg/integration/testdata/gnokey.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,19 @@ gnoland start

## test1 account should be available on default
gnokey query auth/accounts/${USER_ADDR_test1}
cmp stdout gnokey-query-valid.stdout.golden
cmp stderr gnokey-query-valid.stderr.golden
stdout 'height: 0'
stdout 'data: {'
stdout ' "BaseAccount": {'
stdout ' "address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5",'
stdout ' "coins": "[0-9]*ugnot",' # dynamic
stdout ' "public_key": null,'
stdout ' "account_number": "0",'
stdout ' "sequence": "0"'
stdout ' }'
stdout '}'
! stderr '.+' # empty

## invalid gnokey command should raise an error
! gnokey query foo/bar
cmp stdout gnokey-query-invalid.stdout.golden
cmp stderr gnokey-query-invalid.stderr.golden

-- gnokey-query-valid.stdout.golden --
height: 0
data: {
"BaseAccount": {
"address": "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5",
"coins": "9999892000000ugnot",
"public_key": null,
"account_number": "0",
"sequence": "0"
}
}
-- gnokey-query-valid.stderr.golden --
-- gnokey-query-invalid.stdout.golden --
Log:
-- gnokey-query-invalid.stderr.golden --
"gnokey" error: unknown request error
stdout 'Log:'
stderr '"gnokey" error: unknown request error'
Loading