Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(IRO): fixed UT to handle duration for IRO plan #1290

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions x/iro/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,52 +42,52 @@ func TestCmdCreateIRO(t *testing.T) {
}{
{
"valid args",
[]string{"testRollappId", "1000000", "2006-01-02T15:04:05Z", "--curve", "1.2,0.4,0", "--from", addr},
[]string{"testRollappId", "1000000", "24h", "--curve", "1.2,0.4,0", "--from", addr},
"",
},
{
"valid args with incentives",
[]string{"testRollappId", "1000000", "2006-01-02T15:04:05Z", "--curve", "1.2,0.4,0", "--from", addr, "--" + cli.FlagIncentivesEpochs, "10", "--" + cli.FlagIncentivesStartDurationAfterSettlement, "1h"},
[]string{"testRollappId", "1000000", "24h", "--curve", "1.2,0.4,0", "--from", addr, "--" + cli.FlagIncentivesEpochs, "10", "--" + cli.FlagIncentivesStartDurationAfterSettlement, "1h"},
"",
},
{
"missing rollappId",
[]string{"1000000", "2006-01-02T15:04:05Z", "--curve", "1.2,0.4,0", "--from", addr},
[]string{"1000000", "24h", "--curve", "1.2,0.4,0", "--from", addr},
"accepts 3 arg",
},
{
"missing allocation",
[]string{"testRollappId", "1630000000", "--curve", "1.2,0.4,0", "--from", addr},
[]string{"testRollappId", "24h", "--curve", "1.2,0.4,0", "--from", addr},
"accepts 3 arg",
},
{
"missing curve",
[]string{"testRollappId", "1000000", "1630000000", "--from", addr},
[]string{"testRollappId", "1000000", "24h", "--from", addr},
"curve",
},
{
"invalid allocation",
[]string{"testRollappId", "invalid", "1630000000", "--curve", "1.2,0.4,0", "--from", addr},
[]string{"testRollappId", "invalid", "24h", "--curve", "1.2,0.4,0", "--from", addr},
"allocation amount",
},
{
"invalid pre-launch time",
[]string{"testRollappId", "1000000", "invalid", "--curve", "1.2,0.4,0", "--from", addr},
"start time",
"invalid duration",
},
{
"invalid curve",
[]string{"testRollappId", "1000000", "1630000000", "--curve", "s,s,s", "--from", addr},
[]string{"testRollappId", "1000000", "24h", "--curve", "s,s,s", "--from", addr},
"curve",
},
{
"invalid incentives params - start",
[]string{"testRollappId", "1000000", "1630000000", "--curve", "1.2,0.4,0", "--incentives-start", "invalid", "--from", addr},
[]string{"testRollappId", "1000000", "24h", "--curve", "1.2,0.4,0", "--incentives-start", "invalid", "--from", addr},
"incentives-start",
},
{
"invalid incentives params - epochs",
[]string{"testRollappId", "1000000", "1630000000", "--curve", "1.2,0.4,0", "--incentives-epochs", "-1", "--from", addr},
[]string{"testRollappId", "1000000", "24h", "--curve", "1.2,0.4,0", "--incentives-epochs", "-1", "--from", addr},
"incentives-epochs",
},
}
Expand Down
Loading