You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/02/18 11:47:49 UTC

svn commit: r1569265 - /subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py

Author: rhuijben
Date: Tue Feb 18 10:47:48 2014
New Revision: 1569265

URL: http://svn.apache.org/r1569265
Log:
Add XFail test showing that diff of a directory fails without rights of reading
the ancestor directory on svn and dav.

This is caused by rooting the ra operation one level higher than the root,
to allow the diff to properly describe directory replacements, which would be
impossible if the directory is used as the root.

* subversion/tests/cmdline/merge_authz_tests.py
  (diff_unauth_parent): New test. XFail for svn
  (test_list): Add diff_unauth_parent.

Modified:
    subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py?rev=1569265&r1=1569264&r2=1569265&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py Tue Feb 18 10:47:48 2014
@@ -737,6 +737,29 @@ def reintegrate_fails_if_no_root_access(
                                        None, True, True,
                                        '--reintegrate', A_path)
 
+# ### Replace these XFails with @Skip(svntest.main.is_ra_type_file) when fixed.
+@XFail(svntest.main.is_ra_type_dav)
+@XFail(svntest.main.is_ra_type_svn)
+def diff_unauth_parent(sbox):
+  "diff directory without reading parent"
+
+  sbox.build(create_wc=False)
+
+  svntest.actions.run_and_verify_svnmucc(None, None, [],
+                                         'propset', 'k', 'v',
+                                         sbox.repo_url + '/A',
+                                         '-m', 'set prop')
+
+  if is_ra_type_svn() or is_ra_type_dav():
+    write_restrictive_svnserve_conf(sbox.repo_dir)
+    write_authz_file(sbox, {"/"       : "* =",
+                            "/A"      : "* = rw"})
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.repo_url + '/A',
+                                     '-r', '1:2')
+
+
 ########################################################################
 # Run the tests
 
@@ -746,6 +769,7 @@ test_list = [ None,
               mergeinfo_and_skipped_paths,
               merge_fails_if_subtree_is_deleted_on_src,
               reintegrate_fails_if_no_root_access,
+              diff_unauth_parent,
              ]
 serial_only = True