From d82e2dddd2641f7dc738d4599fd99051e7a622dc Mon Sep 17 00:00:00 2001 From: Gregory Newman-Smith Date: Fri, 17 Nov 2023 10:01:20 +0000 Subject: [PATCH] updates from rebase --- db/changes_test.go | 6 +++--- db/crud_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/db/changes_test.go b/db/changes_test.go index 9051d9929f..655a406966 100644 --- a/db/changes_test.go +++ b/db/changes_test.go @@ -575,7 +575,7 @@ func TestCurrentVersionPopulationOnChannelCache(t *testing.T) { require.NoError(t, err) // Put a doc that gets assigned a CV to populate the channel cache with - _, _, err = collection.Put(ctx, "doc1", Body{"channels": []string{"ABC"}}) + _, docVersion, _, err := collection.Put(ctx, "doc1", Body{"channels": []string{"ABC"}}) require.NoError(t, err) err = collection.WaitForPendingChanges(base.TestCtx(t)) require.NoError(t, err) @@ -593,6 +593,6 @@ func TestCurrentVersionPopulationOnChannelCache(t *testing.T) { assert.Equal(t, "doc1", entries[0].DocID) assert.Equal(t, uintCAS, entries[0].Version) assert.Equal(t, bucketUUID, entries[0].SourceID) - assert.Equal(t, syncData.HLV.SourceID, entries[0].SourceID) - assert.Equal(t, syncData.HLV.Version, entries[0].Version) + assert.Equal(t, docVersion.SourceID, entries[0].SourceID) + assert.Equal(t, docVersion.Version, entries[0].Version) } diff --git a/db/crud_test.go b/db/crud_test.go index bc9cbc496c..e2458061c3 100644 --- a/db/crud_test.go +++ b/db/crud_test.go @@ -1693,7 +1693,7 @@ func TestPutExistingCurrentVersion(t *testing.T) { key := "doc1" body := Body{"key1": "value1"} - rev, _, err := collection.Put(ctx, key, body) + rev, _, _, err := collection.Put(ctx, key, body) require.NoError(t, err) // assert on HLV on that above PUT @@ -1710,7 +1710,7 @@ func TestPutExistingCurrentVersion(t *testing.T) { // PUT an update to the above doc body = Body{"key1": "value11"} body[BodyRev] = rev - _, _, err = collection.Put(ctx, key, body) + _, _, _, err = collection.Put(ctx, key, body) require.NoError(t, err) // grab the new version for the above update to assert against later in test @@ -1780,7 +1780,7 @@ func TestPutExistingCurrentVersionWithConflict(t *testing.T) { key := "doc1" body := Body{"key1": "value1"} - _, _, err := collection.Put(ctx, key, body) + _, _, _, err := collection.Put(ctx, key, body) require.NoError(t, err) // assert on the HLV values after the above creation of the doc