From 6391053c61cbc760b978fc0c57d44da2c03e27f1 Mon Sep 17 00:00:00 2001 From: Manfred Touron <94029+moul@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:10:11 +0200 Subject: [PATCH] chore: improve tests (#1232) --- .../pkg/integration/testdata/gnokey.txtar | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/gno.land/pkg/integration/testdata/gnokey.txtar b/gno.land/pkg/integration/testdata/gnokey.txtar index e4d2c93c0c9..123a0ce291c 100644 --- a/gno.land/pkg/integration/testdata/gnokey.txtar +++ b/gno.land/pkg/integration/testdata/gnokey.txtar @@ -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'