Skip to content

Commit

Permalink
ignore backend.Item ID field
Browse files Browse the repository at this point in the history
  • Loading branch information
dboslee committed Jun 25, 2024
1 parent af1b425 commit c7c7939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/backend/clone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestClone(t *testing.T) {
result, err := dst.GetRange(ctx, start, backend.RangeEnd(start), 0)
require.NoError(t, err)

diff := cmp.Diff(items, result.Items, cmpopts.IgnoreFields(backend.Item{}, "Revision"))
diff := cmp.Diff(items, result.Items, cmpopts.IgnoreFields(backend.Item{}, "Revision", "ID"))
require.Empty(t, diff)
require.NoError(t, err)
require.Len(t, result.Items, itemCount)
Expand Down Expand Up @@ -101,7 +101,7 @@ func TestCloneForce(t *testing.T) {
result, err := dst.GetRange(ctx, start, backend.RangeEnd(start), 0)
require.NoError(t, err)

diff := cmp.Diff(items, result.Items, cmpopts.IgnoreFields(backend.Item{}, "Revision"))
diff := cmp.Diff(items, result.Items, cmpopts.IgnoreFields(backend.Item{}, "Revision", "ID"))
require.Empty(t, diff)
require.Len(t, result.Items, itemCount)
}

0 comments on commit c7c7939

Please sign in to comment.