fix: rollback height->Height in x/upgrade plan.DueAt formatting (#9416)
* fix: rollback height->Height in x/upgrade plan.DueAt formatting * fix test make test string match function rollback * fix abci_test.go lowercase height Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
This commit is contained in:
parent
80330ec17c
commit
917fb765d6
|
@ -212,12 +212,12 @@ func TestNoSpuriousUpgrades(t *testing.T) {
|
|||
func TestPlanStringer(t *testing.T) {
|
||||
require.Equal(t, `Upgrade Plan
|
||||
Name: test
|
||||
Height: 100
|
||||
height: 100
|
||||
Info: .`, types.Plan{Name: "test", Height: 100, Info: ""}.String())
|
||||
|
||||
require.Equal(t, fmt.Sprintf(`Upgrade Plan
|
||||
Name: test
|
||||
Height: 100
|
||||
height: 100
|
||||
Info: .`), types.Plan{Name: "test", Height: 100, Info: ""}.String())
|
||||
}
|
||||
|
||||
|
|
|
@ -37,5 +37,5 @@ func (p Plan) ShouldExecute(ctx sdk.Context) bool {
|
|||
|
||||
// DueAt is a string representation of when this plan is due to be executed
|
||||
func (p Plan) DueAt() string {
|
||||
return fmt.Sprintf("Height: %d", p.Height)
|
||||
return fmt.Sprintf("height: %d", p.Height)
|
||||
}
|
||||
|
|
|
@ -33,13 +33,13 @@ func TestPlanString(t *testing.T) {
|
|||
Info: "https://foo.bar/baz",
|
||||
Height: 7890,
|
||||
},
|
||||
expect: "Upgrade Plan\n Name: by height\n Height: 7890\n Info: https://foo.bar/baz.",
|
||||
expect: "Upgrade Plan\n Name: by height\n height: 7890\n Info: https://foo.bar/baz.",
|
||||
},
|
||||
"neither": {
|
||||
p: types.Plan{
|
||||
Name: "almost-empty",
|
||||
},
|
||||
expect: "Upgrade Plan\n Name: almost-empty\n Height: 0\n Info: .",
|
||||
expect: "Upgrade Plan\n Name: almost-empty\n height: 0\n Info: .",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue