Testfest : unshare the docs does not replicate to CBL
Description
CBL: iOS : 2.8.0-114, Android - 2.8.0-262
Steps to Reproduce: * 1. Create a list in todo app 2. Create doc in the list 3. Share doc to user2. 4. Verify user2 can view the doc and list shared by user1 5. Now user1 should unshare the list to user2 6. Verify user2 cannot view the list *Actual Result: * : As soon as user unshare, replicator still show idle and list does not disappear from user2. Tried logout and login, though it has db locally it sync delta from sync gateway which did not made the list disappear . User2 can view the list which unshared by user1
Tried removed the todo app which deletes local DB and resintalled the app and that made it disappear the list as it synced from sync gateway
*Reproducing case : *Test with todo app Also I tested functionally adding following logic on functional test :
1. Create 2 docs in CBL with channel A, B 2. Create user in SGW with channel A, B. 3. push_pull replicate to SGW 4. remove doc A from channel A 5. Remove doc B from channel A , B 6. continue push_pull replication 7. Verify user can only access doc A, but not doc B on SGW 8. Added this additional logic to current test: verify user on CBL cannot access doc B
Right now user can access doc A and doc B
test_doc_removal_from_channel It is seen on all platforms.
AssertionError: user on cbl still able to access the doc even after unshare assert 'cbl_1' not in ['cbl_1', 'cbl_0']
Stacktrace
Verify user can only access doc A, but not doc B on CBL side too cbl_doc_ids = db.getDocIds(cbl_db) > assert cbl_ids[1] not in cbl_doc_ids, "user on cbl still able to access the doc even after unshare" E AssertionError: user on cbl still able to access the doc even after unshare E assert 'cbl_1' not in ['cbl_1', 'cbl_0']
CBL: iOS : 2.8.0-114, Android - 2.8.0-262
Steps to Reproduce: *
1. Create a list in todo app
2. Create doc in the list
3. Share doc to user2.
4. Verify user2 can view the doc and list shared by user1
5. Now user1 should unshare the list to user2
6. Verify user2 cannot view the list
*Actual Result: * : As soon as user unshare, replicator still show idle and list does not disappear from user2.
Tried logout and login, though it has db locally it sync delta from sync gateway which did not made the list disappear . User2 can view the list which unshared by user1
Tried removed the todo app which deletes local DB and resintalled the app and that made it disappear the list as it synced from sync gateway
Expected Result: As soon as user1 unshare the list, it should get disappear from user1.
Logs :
CBL LOGS: iOS logs https://gist.github.com/sridevi-15/f2bf8530f319caacf124c92168818a21
*Reproducing case : *Test with todo app
Also I tested functionally adding following logic on functional test :
1. Create 2 docs in CBL with channel A, B
2. Create user in SGW with channel A, B.
3. push_pull replicate to SGW
4. remove doc A from channel A
5. Remove doc B from channel A , B
6. continue push_pull replication
7. Verify user can only access doc A, but not doc B on SGW
8. Added this additional logic to current test:
verify user on CBL cannot access doc B
Right now user can access doc A and doc B
test_doc_removal_from_channel
It is seen on all platforms.
https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_replication.py#L3284
http://uberjenkins.sc.couchbase.com:8080/job/CBLITE_Android-Listener-Functional-DELTA-SYNC-tests/5/testReport/testsuites.CBLTester.CBL_Functional_tests.TestSetup_FunctionalTests/test_replication/test_doc_removal_from_channel/
Error Message
AssertionError: user on cbl still able to access the doc even after unshare assert 'cbl_1' not in ['cbl_1', 'cbl_0']
Stacktrace
Verify user can only access doc A, but not doc B on CBL side too
cbl_doc_ids = db.getDocIds(cbl_db)
> assert cbl_ids[1] not in cbl_doc_ids, "user on cbl still able to access the doc even after unshare"
E AssertionError: user on cbl still able to access the doc even after unshare
E assert 'cbl_1' not in ['cbl_1', 'cbl_0']
testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_replication.py:3365: AssertionError