Skip to content

Commit

Permalink
update history test for a better coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rrazvan1 committed Jan 17, 2025
1 parent d414f42 commit 3b35c08
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions x/merkledb/history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,17 +654,10 @@ func Test_Change_List(t *testing.T) {
endRoot, err = db.GetMerkleRoot(context.Background())
require.NoError(err)

changes, err = db.history.getValueChanges(startRoot, endRoot, maybe.Nothing[[]byte](), maybe.Nothing[[]byte](), 9)
changes, err = db.history.getValueChanges(startRoot, endRoot, maybe.Some[[]byte]([]byte("key22")), maybe.Some[[]byte]([]byte("key30")), 6)
require.NoError(err)

require.Equal(changes, []*keyChange{

Check failure on line 660 in x/merkledb/history_test.go

View workflow job for this annotation

GitHub Actions / Lint

expected-actual: need to reverse actual and expected values (testifylint)
{
change: &change[maybe.Maybe[[]byte]]{
before: maybe.Some([]byte("value21")),
after: maybe.Nothing[[]byte](),
},
key: ToKey([]byte("key21")),
},
{
change: &change[maybe.Maybe[[]byte]]{
before: maybe.Some([]byte("value22")),
Expand Down Expand Up @@ -707,20 +700,6 @@ func Test_Change_List(t *testing.T) {
},
key: ToKey([]byte("key28")),
},
{
change: &change[maybe.Maybe[[]byte]]{
before: maybe.Nothing[[]byte](),
after: maybe.Some([]byte("value29")),
},
key: ToKey([]byte("key29")),
},
{
change: &change[maybe.Maybe[[]byte]]{
before: maybe.Nothing[[]byte](),
after: maybe.Some([]byte("value30")),
},
key: ToKey([]byte("key30")),
},
})
}

Expand Down

0 comments on commit 3b35c08

Please sign in to comment.