Author: brane
Date: Sat Dec 15 01:16:33 2012
New Revision: 1422171
URL: http://svn.apache.org/viewvc?rev=1422171&view=rev
Log:
If plaintext password storage is disabled by configuration, then basic_test #48
(basic_auth_test) fails over DAV because it expects to be able to save
credentials
between successive commands in non-interactive mode.
* subversion/tests/cmdline/basic_tests.py (basic_auth_test): XFail if testing
via DAV and plaintext password storage is disabled.
* subversion/tests/cmdline/svntest/main.py
(is_plaintext_password_storage_disabled): New predicate. Currently scans
svn_private_config.h; however, it should eventually get information
directly from the libraries.
Modified:
subversion/trunk/subversion/tests/cmdline/basic_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1422171&r1=1422170&r2=1422171&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Sat Dec 15
01:16:33 2012
@@ -2493,8 +2493,16 @@ def basic_relative_url_with_peg_revision
'^//A/@3', iota_url)
+def basic_auth_test_xfail_predicate():
+ """Predicate for XFail for basic_auth_test:
+ The test will fail if plaintext password storage is disabled,
+ and the RA method requires authentication."""
+ return (svntest.main.is_ra_type_dav()
+ and svntest.main.is_plaintext_password_storage_disabled())
+
# Issue 2242, auth cache picking up password from wrong username entry
@Issue(2242)
+@XFail(basic_auth_test_xfail_predicate)
def basic_auth_test(sbox):
"basic auth test"
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1422171&r1=1422170&r2=1422171&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Sat Dec 15
01:16:33 2012
@@ -1234,6 +1234,28 @@ def server_enforces_date_syntax():
def server_has_atomic_revprop():
return options.server_minor_version >= 7
+# FIXME: The following should use information retreived from "svn --version"
+# However, at the time of writing this predicate, that piece of
+# information was not available from a running Subversion client.
+def is_plaintext_password_storage_disabled():
+ confighandle = None
+ try:
+ predicate = re.compile(r"^\s*#\s*define\s+"
+ r"SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE")
+ configfile = os.path.abspath(general_wc_dir)
+ for i in range(4):
+ configfile = os.path.dirname(configfile)
+ configfile = os.path.join(configfile, "svn_private_config.h")
+ confighandle = open(configfile, 'rt')
+ for line in confighandle.readlines():
+ if predicate.match(line):
+ return True
+ except:
+ pass
+ if confighandle:
+ confighandle.close()
+ return False
+
######################################################################