Skip to content

Commit

Permalink
changed commands in cli_test to match refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
UnitylChaos committed Jun 1, 2018
1 parent aa41cef commit a03638d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/gaia/cli_test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

func TestGaiaCLISend(t *testing.T) {

tests.ExecuteT(t, "gaiad unsafe_reset_all")
tests.ExecuteT(t, "gaiad tendermint unsafe_reset_all")
pass := "1234567890"
executeWrite(t, "gaiacli keys delete foo", pass)
executeWrite(t, "gaiacli keys delete bar", pass)
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestGaiaCLISend(t *testing.T) {

func TestGaiaCLICreateValidator(t *testing.T) {

tests.ExecuteT(t, "gaiad unsafe_reset_all")
tests.ExecuteT(t, "gaiad tendermint unsafe_reset_all")
pass := "1234567890"
executeWrite(t, "gaiacli keys delete foo", pass)
executeWrite(t, "gaiacli keys delete bar", pass)
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestGaiaCLICreateValidator(t *testing.T) {
assert.Equal(t, int64(40), fooAcc.GetCoins().AmountOf("steak"))

// create validator
cvStr := fmt.Sprintf("gaiacli create-validator %v", flags)
cvStr := fmt.Sprintf("gaiacli stake create-validator %v", flags)
cvStr += fmt.Sprintf(" --name=%v", "bar")
cvStr += fmt.Sprintf(" --address-validator=%v", barCech)
cvStr += fmt.Sprintf(" --pubkey=%v", barCeshPubKey)
Expand All @@ -117,12 +117,12 @@ func TestGaiaCLICreateValidator(t *testing.T) {
barAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barCech, flags))
require.Equal(t, int64(8), barAcc.GetCoins().AmountOf("steak"), "%v", barAcc)

validator := executeGetValidator(t, fmt.Sprintf("gaiacli validator %v --output=json %v", barCech, flags))
validator := executeGetValidator(t, fmt.Sprintf("gaiacli stake validator %v --output=json %v", barCech, flags))
assert.Equal(t, validator.Owner, barAddr)
assert.Equal(t, "2/1", validator.PoolShares.Amount.String())

// unbond a single share
unbondStr := fmt.Sprintf("gaiacli unbond %v", flags)
unbondStr := fmt.Sprintf("gaiacli stake unbond %v", flags)
unbondStr += fmt.Sprintf(" --name=%v", "bar")
unbondStr += fmt.Sprintf(" --address-validator=%v", barCech)
unbondStr += fmt.Sprintf(" --address-delegator=%v", barCech)
Expand All @@ -135,7 +135,7 @@ func TestGaiaCLICreateValidator(t *testing.T) {

barAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barCech, flags))
require.Equal(t, int64(9), barAcc.GetCoins().AmountOf("steak"), "%v", barAcc)
validator = executeGetValidator(t, fmt.Sprintf("gaiacli validator %v --output=json %v", barCech, flags))
validator = executeGetValidator(t, fmt.Sprintf("gaiacli stake validator %v --output=json %v", barCech, flags))
assert.Equal(t, "1/1", validator.PoolShares.Amount.String())
}

Expand Down

0 comments on commit a03638d

Please sign in to comment.