@@ -3568,6 +3568,52 @@ func TestBlipPullConflict(t *testing.T) {
35683568 })
35693569}
35703570
3571+ func TestPushHLVOntoLegacyRev (t * testing.T ) {
3572+ t .Skip ("CBG-4909 skipping due to conflict resolution not yet implemented for CBL rev tree" )
3573+
3574+ btcRunner := NewBlipTesterClientRunner (t )
3575+ btcRunner .SkipSubtest [RevtreeSubtestName ] = true // revtree subtest not relevant to this test
3576+ btcRunner .Run (func (t * testing.T ) {
3577+ // Steps:
3578+ // 1. Rev 1-abc is created on SGW
3579+ // 2. Client pulls this revision (one shot)
3580+ // 3. Doc is mutated on SGW to get 2-abc (legacy rev only)
3581+ // 4. Doc is updated on CBL to get 100@CBL1 (HLV)
3582+ // 5. Client attempts to push this doc update
3583+ rt := NewRestTester (t ,
3584+ & RestTesterConfig {
3585+ SyncFn : channels .DocChannelsSyncFunction ,
3586+ })
3587+ defer rt .Close ()
3588+
3589+ docID := SafeDocumentName (t , t .Name ())
3590+
3591+ const alice = "alice"
3592+ rt .CreateUser (alice , []string {"ABC" })
3593+
3594+ opts := & BlipTesterClientOpts {Username : alice }
3595+ client := btcRunner .NewBlipTesterClientOptsWithRT (rt , opts )
3596+
3597+ // create legacy doc on rt and have CBL pull it
3598+ doc := rt .CreateDocNoHLV (docID , db.Body {"channels" : []string {"ABC" }})
3599+ btcRunner .StartOneshotPull (client .id )
3600+
3601+ docInitVersion := doc .ExtractDocVersion ()
3602+ btcRunner .WaitForVersion (client .id , docID , docInitVersion )
3603+
3604+ // update doc again in legacy mode on rt
3605+ _ = rt .CreateDocNoHLV (docID , db.Body {"channels" : []string {"ABC" }, "_rev" : docInitVersion .RevTreeID })
3606+
3607+ // update doc on client to have vv given to it and attempt to push it
3608+ newVersion := btcRunner .AddRev (client .id , docID , & docInitVersion , []byte (`{"channels": ["ABC"]}` ))
3609+
3610+ btcRunner .StartPush (client .id )
3611+ btcRunner .StartPull (client .id )
3612+
3613+ rt .WaitForVersion (docID , newVersion )
3614+ })
3615+ }
3616+
35713617func TestTombstoneCount (t * testing.T ) {
35723618 base .SetUpTestLogging (t , base .LevelDebug , base .KeyAll )
35733619 rtConfig := RestTesterConfig {
0 commit comments