From abce766f500968588ac8a551c0e9706db23db6c4 Mon Sep 17 00:00:00 2001 From: Michael Tsitrin Date: Mon, 7 Oct 2024 15:34:45 +0300 Subject: [PATCH] fixed UT to handle duration for IRO plan --- x/iro/cli/cli_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/x/iro/cli/cli_test.go b/x/iro/cli/cli_test.go index ae07833aa..f0f4b4e33 100644 --- a/x/iro/cli/cli_test.go +++ b/x/iro/cli/cli_test.go @@ -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", }, }