Author: julianfoad
Date: Thu Feb  5 12:43:35 2015
New Revision: 1657556

URL: http://svn.apache.org/r1657556
Log:
In the test suite, make run_svnsync() supply the default username and
password instead of requiring its caller to supply them, just like run_svn()
and others already do.

Note: svnsync can take separate username/password arguments for the source
repository and the target repository, but we don't yet support that here as
the test suite does not currently need it.

* subversion/tests/cmdline/svnsync_tests.py
  (run_sync,
   run_copy_revprops,
   run_init,
   run_info,
   info_synchronized): Don't supply a username and password here...

* subversion/tests/cmdline/svntest/main.py
  (run_svnsync): ... but here instead.

Modified:
    subversion/trunk/subversion/tests/cmdline/svnsync_tests.py
    subversion/trunk/subversion/tests/cmdline/svntest/main.py

Modified: subversion/trunk/subversion/tests/cmdline/svnsync_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnsync_tests.py?rev=1657556&r1=1657555&r2=1657556&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnsync_tests.py Thu Feb  5 
12:43:35 2015
@@ -63,13 +63,9 @@ def run_sync(url, source_url=None, expec
              source_prop_encoding=None):
   "Synchronize the mirror repository with the master"
   if source_url is not None:
-    args = ["synchronize", url, source_url,
-      "--username", svntest.main.wc_author,
-      "--password", svntest.main.wc_passwd]
+    args = ["synchronize", url, source_url]
   else: # Allow testing of old source-URL-less syntax
-    args = ["synchronize", url,
-      "--username", svntest.main.wc_author,
-      "--password", svntest.main.wc_passwd]
+    args = ["synchronize", url]
   if source_prop_encoding:
     args.append("--source-prop-encoding")
     args.append(source_prop_encoding)
@@ -95,9 +91,7 @@ def run_sync(url, source_url=None, expec
 def run_copy_revprops(url, source_url, expected_error=None,
                       source_prop_encoding=None):
   "Copy revprops to the mirror repository from the master"
-  args = ["copy-revprops", url, source_url,
-    "--username", svntest.main.wc_author,
-    "--password", svntest.main.wc_passwd]
+  args = ["copy-revprops", url, source_url]
   if source_prop_encoding:
     args.append("--source-prop-encoding")
     args.append(source_prop_encoding)
@@ -123,9 +117,7 @@ def run_copy_revprops(url, source_url, e
 
 def run_init(dst_url, src_url, source_prop_encoding=None):
   "Initialize the mirror repository from the master"
-  args = ["initialize", dst_url, src_url,
-    "--username", svntest.main.wc_author,
-    "--password", svntest.main.wc_passwd]
+  args = ["initialize", dst_url, src_url]
   if source_prop_encoding:
     args.append("--source-prop-encoding")
     args.append(source_prop_encoding)
@@ -142,9 +134,7 @@ def run_init(dst_url, src_url, source_pr
 def run_info(url, expected_error=None):
   "Print synchronization information of the repository"
   exit_code, output, errput = svntest.main.run_svnsync(
-    "info", url,
-    "--username", svntest.main.wc_author,
-    "--password", svntest.main.wc_passwd)
+    "info", url)
   if errput:
     if expected_error is None:
       raise SVNUnexpectedStderr(errput)
@@ -434,9 +424,7 @@ def info_synchronized(sbox):
   run_sync(dest_sbox.repo_url)
 
   exit_code, output, errput = svntest.main.run_svnsync(
-    "info", dest_sbox.repo_url,
-    "--username", svntest.main.wc_author,
-    "--password", svntest.main.wc_passwd)
+    "info", dest_sbox.repo_url)
   if errput:
       raise SVNUnexpectedStderr(errput)
 

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1657556&r1=1657555&r2=1657556&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Thu Feb  5 
12:43:35 2015
@@ -763,7 +763,8 @@ def run_svnrdump(stdin_input, *varargs):
 def run_svnsync(*varargs):
   """Run svnsync with VARARGS, returns exit code as int; stdout, stderr as
   list of lines (including line terminators)."""
-  return run_command(svnsync_binary, 1, False, *(_with_config_dir(varargs)))
+  return run_command(svnsync_binary, 1, False,
+                     *(_with_auth(_with_config_dir(varargs))))
 
 def run_svnversion(*varargs):
   """Run svnversion with VARARGS, returns exit code as int; stdout, stderr


Reply via email to