From 718aba319d3aa610a6bc7bf698524f59524e950d Mon Sep 17 00:00:00 2001 From: krhubert Date: Wed, 4 Mar 2020 09:14:10 +0100 Subject: [PATCH] Add e2e test for withdraw from runner --- e2e/execution_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/e2e/execution_test.go b/e2e/execution_test.go index 368e12eae..dd7f43d9b 100644 --- a/e2e/execution_test.go +++ b/e2e/execution_test.go @@ -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) {