Skip to content

Commit c4489d9

Browse files
authored
refactor: remove duplicate vesting tests (#15844)
1 parent a7d8477 commit c4489d9

File tree

5 files changed

+298
-240
lines changed

5 files changed

+298
-240
lines changed

tests/e2e/auth/vesting/cli_test.go

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/e2e/auth/vesting/suite.go

Lines changed: 0 additions & 221 deletions
This file was deleted.

x/auth/vesting/client/cli/test.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"start_time": 1625204910,
3+
"period": [
4+
{
5+
"coins": "10test",
6+
"length_seconds": 2592000
7+
},
8+
{
9+
"coins": "10test",
10+
"length_seconds": 2592000
11+
}
12+
]
13+
}

x/auth/vesting/client/cli/tx.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cli
22

33
import (
44
"encoding/json"
5+
"errors"
56
"fmt"
67
"os"
78
"strconv"
@@ -61,6 +62,10 @@ timestamp.`,
6162
return err
6263
}
6364

65+
if args[1] == "" {
66+
return errors.New("amount is empty")
67+
}
68+
6469
amount, err := sdk.ParseCoinsNormalized(args[1])
6570
if err != nil {
6671
return err
@@ -104,6 +109,10 @@ tokens.`,
104109
return err
105110
}
106111

112+
if args[1] == "" {
113+
return errors.New("amount is empty")
114+
}
115+
107116
amount, err := sdk.ParseCoinsNormalized(args[1])
108117
if err != nil {
109118
return err

0 commit comments

Comments
 (0)