Skip to content

Commit

Permalink
Add e2e test for withdraw from runner
Browse files Browse the repository at this point in the history
  • Loading branch information
krhubert committed Mar 4, 2020
1 parent 0e0320b commit 718aba3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions e2e/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,19 @@ func testExecution(t *testing.T) {
require.NoError(t, cclient.QueryJSON("custom/bank/balances", param, &coins))
require.True(t, coins.IsZero(), coins)
})

t.Run("withdraw from runner", func(t *testing.T) {
acc, err := cclient.GetAccount()
require.NoError(t, err)
coins := sdk.NewCoins(sdk.NewCoin("atto", sdk.NewInt(63000)))
msg := ownership.NewMsgWithdrawCoins(testRunnerHash, coins, acc.GetAddress())
_, err = cclient.BuildAndBroadcastMsg(msg)
require.NoError(t, err)

param := bank.NewQueryBalanceParams(sdk.AccAddress(crypto.AddressHash(testRunnerHash)))
require.NoError(t, cclient.QueryJSON("custom/bank/balances", param, &coins))
require.True(t, coins.IsZero(), coins)
})
})

t.Run("many executions in parallel", func(t *testing.T) {
Expand Down

0 comments on commit 718aba3

Please sign in to comment.