Skip to content

Commit

Permalink
refactor: remove duplicate vesting tests (cosmos#15844)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Apr 14, 2023
1 parent a7d8477 commit c4489d9
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 240 deletions.
19 changes: 0 additions & 19 deletions tests/e2e/auth/vesting/cli_test.go

This file was deleted.

221 changes: 0 additions & 221 deletions tests/e2e/auth/vesting/suite.go

This file was deleted.

13 changes: 13 additions & 0 deletions x/auth/vesting/client/cli/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"start_time": 1625204910,
"period": [
{
"coins": "10test",
"length_seconds": 2592000
},
{
"coins": "10test",
"length_seconds": 2592000
}
]
}
9 changes: 9 additions & 0 deletions x/auth/vesting/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"encoding/json"
"errors"
"fmt"
"os"
"strconv"
Expand Down Expand Up @@ -61,6 +62,10 @@ timestamp.`,
return err
}

if args[1] == "" {
return errors.New("amount is empty")
}

amount, err := sdk.ParseCoinsNormalized(args[1])
if err != nil {
return err
Expand Down Expand Up @@ -104,6 +109,10 @@ tokens.`,
return err
}

if args[1] == "" {
return errors.New("amount is empty")
}

amount, err := sdk.ParseCoinsNormalized(args[1])
if err != nil {
return err
Expand Down
Loading

0 comments on commit c4489d9

Please sign in to comment.