You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2020/12/01 13:45:12 UTC

svn commit: r1883989 - in /subversion/trunk/subversion/tests/cmdline: davautocheck.sh mod_authz_svn_tests.py

Author: stsp
Date: Tue Dec  1 13:45:12 2020
New Revision: 1883989

URL: http://svn.apache.org/viewvc?rev=1883989&view=rev
Log:
Fix a mix-up of repository paths in repos_relative_access_file() test.

The test was loading an authz file from disk, rather than from the test case
repository. This defeated the entire point of the test, which is to test the
AuthzSVNReposRelativeAccessFile option in httpd.conf.

* subversion/tests/cmdline/davautocheck.sh: Fix SVNParentPath used by
   Location in-repos-authz.

* subversion/tests/cmdline/mod_authz_svn_tests.py
  (repos_relative_access_file): Adjust expected repository URL. Avoid checking
   out a working copy manually and let the sandbox create it for us. We can
   simply relocate this working copy in order to commit our authz fules file.

Modified:
    subversion/trunk/subversion/tests/cmdline/davautocheck.sh
    subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/davautocheck.sh?rev=1883989&r1=1883988&r2=1883989&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/trunk/subversion/tests/cmdline/davautocheck.sh Tue Dec  1 13:45:12 2020
@@ -614,7 +614,7 @@ cat >> "$HTTPD_CFG" <<__EOF__
 __EOF__
 location_common
 cat >> "$HTTPD_CFG" <<__EOF__
-  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories"
   Require           valid-user
   Satisfy Any
   AuthzSVNReposRelativeAccessFile "^/authz"

Modified: subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py?rev=1883989&r1=1883988&r2=1883989&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py Tue Dec  1 13:45:12 2020
@@ -1047,19 +1047,16 @@ def authn_sallrall(sbox):
 def repos_relative_access_file(sbox):
   "repos-relative access file"
 
-  sbox.build(create_wc = False)
+  sbox.build()
 
-  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-                                        '/authz-test-work/in-repos-authz')
-  svntest.main.write_authz_file(sbox, {"/": "", "/A": "%s = rw" % user1})
-
-  expected_output = svntest.wc.State(sbox.wc_dir, { })
-  expected_disk = svntest.main.greek_state.copy()
-  svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [], 'checkout',
-      sbox.file_protocol_repo_url(), sbox.wc_dir)
+  test_area_url = sbox.repo_url.replace('/svn-test-work/repositories/',
+                                        '/authz-test-work/in-repos-authz/')
 
-  shutil.copy(sbox.authz_file, os.path.join(sbox.wc_dir, 'authz'))
+  svntest.main.write_authz_file(sbox, {"/": "", "/A": "%s = rw" % user1})
+  shutil.move(sbox.authz_file, os.path.join(sbox.wc_dir, 'authz'))
   sbox.simple_add('authz')
+  svntest.actions.run_and_verify_svn(None, [], 'relocate',
+      sbox.file_protocol_repo_url(), sbox.wc_dir)
   sbox.simple_commit(message="adding in-repository authz rules file")
 
   in_repos_authz_tests = (