File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -3222,3 +3222,25 @@ func TestSilentHandlerLoggingInTrace(t *testing.T) {
32223222 RequireStatus (t , resp , http .StatusOK )
32233223 })
32243224}
3225+
3226+ // TestHLVUpdateOnRevReplicatorPut:
3227+ // - Test that the HLV is updated correctly when a document is put via the rev replicator running in rev mode
3228+ func TestHLVUpdateOnRevReplicatorPut (t * testing.T ) {
3229+
3230+ rt := NewRestTester (t , nil )
3231+ defer rt .Close ()
3232+
3233+ docID := t .Name ()
3234+ newVersion := DocVersion {
3235+ RevTreeID : "1-abc" ,
3236+ }
3237+ _ = rt .PutNewEditsFalse (docID , newVersion , EmptyDocVersion (), `{"some":"body"}` )
3238+
3239+ collection , ctx := rt .GetSingleTestDatabaseCollection ()
3240+ syncData , err := collection .GetDocSyncData (ctx , docID )
3241+ require .NoError (t , err )
3242+
3243+ assert .Equal (t , rt .GetDatabase ().EncodedSourceID , syncData .HLV .SourceID )
3244+ assert .Equal (t , base .HexCasToUint64 (syncData .Cas ), syncData .HLV .Version )
3245+ assert .Equal (t , base .HexCasToUint64 (syncData .Cas ), syncData .HLV .CurrentVersionCAS )
3246+ }
You can’t perform that action at this time.
0 commit comments