From 6e65f5fe1d894fba0a1497c70c8d996f7c5173d6 Mon Sep 17 00:00:00 2001 From: dudong2 Date: Fri, 10 Feb 2023 11:47:10 +0900 Subject: [PATCH] test: restore height based plan test --- x/upgrade/types/plan_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/x/upgrade/types/plan_test.go b/x/upgrade/types/plan_test.go index 9f3ef3b4ed..25dcc9541a 100644 --- a/x/upgrade/types/plan_test.go +++ b/x/upgrade/types/plan_test.go @@ -58,6 +58,18 @@ func TestPlanValid(t *testing.T) { p types.Plan valid bool }{ + "proper by height": { + p: types.Plan{ + Name: "all-good", + Height: 123450000, + }, + valid: true, + }, + "no name": { + p: types.Plan{ + Height: 123450000, + }, + }, "IBC upgrade": { p: types.Plan{ Height: 123450000, @@ -70,6 +82,12 @@ func TestPlanValid(t *testing.T) { Info: "important", }, }, + "negative height": { + p: types.Plan{ + Name: "minus", + Height: -12345, + }, + }, } for name, tc := range cases {