upgrade to latest sdk (#52)
As per changes introduced with cosmos/cosmos-sdk#4602
This commit is contained in:
@@ -278,43 +278,6 @@ func TestGaiaCLISend(t *testing.T) {
|
||||
f.Cleanup()
|
||||
}
|
||||
|
||||
func TestGaiaCLIConfirmTx(t *testing.T) {
|
||||
t.Parallel()
|
||||
f := InitFixtures(t)
|
||||
|
||||
// start gaiad server
|
||||
proc := f.GDStart()
|
||||
defer proc.Stop(false)
|
||||
|
||||
// Save key addresses for later use
|
||||
fooAddr := f.KeyAddress(keyFoo)
|
||||
barAddr := f.KeyAddress(keyBar)
|
||||
|
||||
fooAcc := f.QueryAccount(fooAddr)
|
||||
startTokens := sdk.TokensFromConsensusPower(50)
|
||||
require.Equal(t, startTokens, fooAcc.GetCoins().AmountOf(denom))
|
||||
|
||||
// send some tokens from one account to the other
|
||||
sendTokens := sdk.TokensFromConsensusPower(10)
|
||||
f.txSendWithConfirm(keyFoo, barAddr, sdk.NewCoin(denom, sendTokens), "Y")
|
||||
tests.WaitForNextNBlocksTM(1, f.Port)
|
||||
|
||||
// ensure account balances match expected
|
||||
barAcc := f.QueryAccount(barAddr)
|
||||
require.Equal(t, sendTokens, barAcc.GetCoins().AmountOf(denom))
|
||||
|
||||
// send some tokens from one account to the other (cancelling confirmation)
|
||||
f.txSendWithConfirm(keyFoo, barAddr, sdk.NewCoin(denom, sendTokens), "n")
|
||||
tests.WaitForNextNBlocksTM(1, f.Port)
|
||||
|
||||
// ensure account balances match expected
|
||||
barAcc = f.QueryAccount(barAddr)
|
||||
require.Equal(t, sendTokens, barAcc.GetCoins().AmountOf(denom))
|
||||
|
||||
// Cleanup testing directories
|
||||
f.Cleanup()
|
||||
}
|
||||
|
||||
func TestGaiaCLIGasAuto(t *testing.T) {
|
||||
t.Parallel()
|
||||
f := InitFixtures(t)
|
||||
|
||||
@@ -313,14 +313,6 @@ func (f *Fixtures) TxSend(from string, to sdk.AccAddress, amount sdk.Coin, flags
|
||||
return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), client.DefaultKeyPass)
|
||||
}
|
||||
|
||||
func (f *Fixtures) txSendWithConfirm(
|
||||
from string, to sdk.AccAddress, amount sdk.Coin, confirm string, flags ...string,
|
||||
) (bool, string, string) {
|
||||
|
||||
cmd := fmt.Sprintf("%s tx send %s %s %s %v", f.GaiacliBinary, from, to, amount, f.Flags())
|
||||
return executeWriteRetStdStreams(f.T, addFlags(cmd, flags), confirm, client.DefaultKeyPass)
|
||||
}
|
||||
|
||||
// TxSign is gaiacli tx sign
|
||||
func (f *Fixtures) TxSign(signer, fileName string, flags ...string) (bool, string, string) {
|
||||
cmd := fmt.Sprintf("%s tx sign %v --from=%s %v", f.GaiacliBinary, f.Flags(), signer, fileName)
|
||||
|
||||
Reference in New Issue
Block a user