[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r29753 - in trunk/subversion/tests/cmdline: . svntest

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Fri, 07 Mar 2008 19:02:05 +0530

julianfoad_at_tigris.org wrote:
> Author: julianfoad
> Date: Thu Mar 6 14:27:59 2008
> New Revision: 29753
> Modified: trunk/subversion/tests/cmdline/lock_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/lock_tests.py?pathrev=29753&r1=29752&r2=29753
> ==============================================================================
> @@ -1342,10 +1344,9 @@
> # Then, unlocking the WC path should fail.
> # ### The error message returned is actually this, but let's worry about that
> # ### another day...
> - svntest.actions.run_and_verify_svn(None, None,
> - ".*((No lock on path)|(400 Bad Request))",
> - 'unlock',
> - file_path)
> + svntest.actions.run_and_verify_svn2(
> + None, None, ".*((No lock on path)|(400 Bad Request))", 0,
> + 'unlock', file_path)

In the above the exit code must be "1". As long as http is concerned the
request fails and returns a "1". So we need to check it here.

> #----------------------------------------------------------------------
> # Verify that info shows lock info for locked files with URI-unsafe names
> @@ -1397,15 +1398,16 @@
>
> svntest.actions.run_and_verify_status(wc_dir, expected_status)
>
> - # now try to unlock with user jconstant, should fail.
> + # now try to unlock with user jconstant, should fail but exit 0.
> if sbox.repo_url.startswith("http"):
> expected_err = ".*403 Forbidden.*"
> else:
> expected_err = "svn: warning: User '%s' is trying to use a lock owned by "\
> "'%s'.*" % (svntest.main.wc_author2, svntest.main.wc_author)
> - svntest.actions.run_and_verify_svn(None, [], expected_err, 'unlock',
> - '--username', svntest.main.wc_author2,
> - pi_path)
> + svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
> + 'unlock',
> + '--username', svntest.main.wc_author2,
> + pi_path)

Same here too. When we have "403" from http it is a failed request and the exit
code must be 1.

There are 2 lock tests failing in 'make davautocheck' due to this.

The attached patch fixes this. I would like to hear whether my inference is
correct, before I commit.

[[[
Fix lock_test failure in dav.

* subversion/tests/cmdline/lock_tests.py
   (unlock_wrong_token, unlocked_lock_of_other_user): fix test failure due
    to wrong exit code expectation for http errors.

Patch by: stylesen
]]]

-- 
Senthil Kumaran S
http://www.stylesen.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-03-07 14:32:25 CET

This is an archived mail posted to the Subversion Dev mailing list.