@@ -87,7 +87,7 @@ access_test_() ->
87
87
fun should_let_user_create_doc_for_themselves /2 ,
88
88
fun should_not_let_user_create_doc_for_someone_else /2 ,
89
89
fun should_let_user_create_access_ddoc /2 ,
90
- % fun access_ddoc_should_have_no_effects/2,
90
+ fun access_ddoc_should_have_no_effects /2 ,
91
91
92
92
% Doc updates
93
93
fun users_with_access_can_update_doc /2 ,
@@ -100,8 +100,6 @@ access_test_() ->
100
100
fun user_with_access_can_read_doc /2 ,
101
101
fun user_without_access_can_not_read_doc /2 ,
102
102
fun user_can_not_read_doc_without_access /2 ,
103
- fun admin_with_access_can_read_conflicted_doc /2 ,
104
- % fun user_with_access_can_not_read_conflicted_doc/2,
105
103
106
104
% Doc deletes
107
105
fun should_let_admin_delete_doc_with_access /2 ,
@@ -130,10 +128,8 @@ access_test_() ->
130
128
131
129
fun should_allow_user_to_replicate_from_access_to_access /2 ,
132
130
fun should_allow_user_to_replicate_from_access_to_no_access /2 ,
133
- % TODO: find out why this is flakey
134
- % fun should_allow_user_to_replicate_from_no_access_to_access/2,
135
-
136
- % fun should_allow_user_to_replicate_from_no_access_to_no_access/2,
131
+ fun should_allow_user_to_replicate_from_no_access_to_access /2 ,
132
+ fun should_allow_user_to_replicate_from_no_access_to_no_access /2 ,
137
133
138
134
% _revs_diff for docs you don’t have access to
139
135
fun should_not_allow_user_to_revs_diff_other_docs /2
@@ -373,45 +369,6 @@ user_with_access_can_read_doc(_PortType, Url) ->
373
369
),
374
370
? _assertEqual (200 , Code ).
375
371
376
- % TODO: induce conflict with two different _access users per rev
377
- % could be comiing from a split-brain scenario
378
- % whoever ends up winner can read the doc, but not the leaf
379
- % that doesn’t belong to them
380
- % whoever loses can only request their leaf
381
- % user_with_access_can_not_read_conflicted_doc(_PortType, Url) ->
382
- % {ok, 201, _, _} = test_request:put(
383
- % Url ++ "/db/a",
384
- % ?ADMIN_REQ_HEADERS,
385
- % "{\"_id\":\"f1\",\"a\":1,\"_access\":[\"x\"]}"
386
- % ),
387
- % {ok, 201, _, _} = test_request:put(
388
- % Url ++ "/db/a?new_edits=false",
389
- % ?ADMIN_REQ_HEADERS,
390
- % "{\"_id\":\"f1\",\"_rev\":\"7-XYZ\",\"a\":1,\"_access\":[\"x\"]}"
391
- % ),
392
- % {ok, Code, _, _} = test_request:get(
393
- % Url ++ "/db/a",
394
- % ?USERX_REQ_HEADERS
395
- % ),
396
- % ?_assertEqual(403, Code).
397
-
398
- admin_with_access_can_read_conflicted_doc (_PortType , Url ) ->
399
- {ok , 201 , _ , _ } = test_request :put (
400
- Url ++ " /db/a" ,
401
- ? ADMIN_REQ_HEADERS ,
402
- " {\" _id\" :\" a\" ,\" a\" :1,\" _access\" :[\" x\" ]}"
403
- ),
404
- {ok , 201 , _ , _ } = test_request :put (
405
- Url ++ " /db/a?new_edits=false" ,
406
- ? ADMIN_REQ_HEADERS ,
407
- " {\" _id\" :\" a\" ,\" _rev\" :\" 7-XYZ\" ,\" a\" :1,\" _access\" :[\" x\" ]}"
408
- ),
409
- {ok , Code , _ , _ } = test_request :get (
410
- Url ++ " /db/a" ,
411
- ? ADMIN_REQ_HEADERS
412
- ),
413
- ? _assertEqual (200 , Code ).
414
-
415
372
user_without_access_can_not_read_doc (_PortType , Url ) ->
416
373
{ok , 201 , _ , _ } = test_request :put (
417
374
Url ++ " /db/a" ,
0 commit comments