From d7338da9db31d522caaeb346ba4dc6cd7bf722a9 Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Thu, 19 Sep 2024 14:27:16 -0400 Subject: [PATCH] fix test changes --- plugin/evm/validators/state_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugin/evm/validators/state_test.go b/plugin/evm/validators/state_test.go index 7ba50bde89..2babe1d6ab 100644 --- a/plugin/evm/validators/state_test.go +++ b/plugin/evm/validators/state_test.go @@ -50,13 +50,13 @@ func TestState(t *testing.T) { require.Equal(startTime.Unix(), lastUpdated.Unix()) // set uptime - newuptime := 2 * time.Minute + newUptime := 2 * time.Minute newLastUpdated := lastUpdated.Add(time.Hour) - require.NoError(state.SetUptime(nodeID, newuptime, newLastUpdated)) + require.NoError(state.SetUptime(nodeID, newUptime, newLastUpdated)) // get new uptime uptime, lastUpdated, err = state.GetUptime(nodeID) require.NoError(err) - require.Equal(newuptime, uptime) + require.Equal(newUptime, uptime) require.Equal(newLastUpdated, lastUpdated) // set status @@ -93,9 +93,9 @@ func TestWriteValidator(t *testing.T) { require.True(db.Has(vID[:])) // set uptime - newuptime := 2 * time.Minute + newUptime := 2 * time.Minute newLastUpdated := startTime.Add(time.Hour) - require.NoError(state.SetUptime(nodeID, newuptime, newLastUpdated)) + require.NoError(state.SetUptime(nodeID, newUptime, newLastUpdated)) require.NoError(state.WriteState()) // refresh state, should load from DB @@ -105,7 +105,7 @@ func TestWriteValidator(t *testing.T) { // get uptime uptime, lastUpdated, err := state.GetUptime(nodeID) require.NoError(err) - require.Equal(newuptime, uptime) + require.Equal(newUptime, uptime) require.Equal(newLastUpdated.Unix(), lastUpdated.Unix()) // delete @@ -171,7 +171,7 @@ func TestParseValidator(t *testing.T) { }, }, { - name: " ", + name: "invalid codec version", bytes: []byte{ // codec version 0x00, 0x02,