Skip to content

Commit

Permalink
noto: add additional asserts in E2E test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Richardson <[email protected]>
  • Loading branch information
awrichar committed Sep 16, 2024
1 parent fd415cc commit d376cc8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions domains/noto/internal/noto/e2e_noto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ func TestNoto(t *testing.T) {
assert.ErrorContains(t, rpcerr.Error(), "mint can only be initiated by notary")
assert.True(t, boolResult)

coins, err = noto.FindCoins(ctx, "{}")
require.NoError(t, err)
require.Len(t, coins, 1)

log.L(ctx).Infof("Transfer 150 from notary (should fail)")
rpcerr = rpc.CallRPC(ctx, &boolResult, "testbed_invoke", &tktypes.PrivateContractInvoke{
From: notaryName,
Expand All @@ -202,6 +206,10 @@ func TestNoto(t *testing.T) {
require.NotNil(t, rpcerr)
assert.Regexp(t, "insufficient funds", rpcerr.Error())

coins, err = noto.FindCoins(ctx, "{}")
require.NoError(t, err)
require.Len(t, coins, 1)

log.L(ctx).Infof("Transfer 50 from notary to recipient1")
rpcerr = rpc.CallRPC(ctx, &boolResult, "testbed_invoke", &tktypes.PrivateContractInvoke{
From: notaryName,
Expand Down

0 comments on commit d376cc8

Please sign in to comment.