You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2011/02/11 16:22:57 UTC

Re: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
> +  expected_error_for_cat = "svn: E175013: Unable to connect to a repository"+ \
> +                            " at URL '" + mu_url + "'\n" + \
> +                            "svn: E175013: Access to '/" + mu_repo_path + \
> +                            "' forbidden\n" + \
> +                            "svn: E175009: XML parsing failed: (403 Forbidden)"

Bad idea to hard code so much of the specific message we're generating
today; it's bound to change later.

(eg, the XML parsing thing would ideally go away at some point)

Just 'Access.*${mu_url}.*forbidden' is enough IMO.

RE: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Kamesh Jayachandran <ka...@collab.net>.
>> >>Bad idea to hard code so much of the specific message we're generating
>> >>today; it's bound to change later.
>> >
>> >>(eg, the XML parsing thing would ideally go away at some point)
>> >
>> >>Just 'Access.*${mu_url}.*forbidden' is enough IMO.
>> >
>> >
>> > Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would
>> > remove it as soon as I reach before my working copy.

>Thanks.  But why remove the E170001?  Its very purpose is to provide
>a machine-readable identification of the error... (exactly what tests
>need)


In r1068802 We did the following,

-  expected_error_for_cat = "svn: E175013: Unable to connect to a repository"+ \
-                            " at URL '" + mu_url + "'\n" + \
-                            "svn: E175013: Access to '/" + mu_repo_path + \
-                            "' forbidden\n" + \
-                            "svn: E175009: XML parsing failed: (403 Forbidden)"
 
+  if sbox.repo_url.startswith("http"):
+    expected_error_for_cat = ".*[Ff]orbidden.*"
+  else:
+    expected_error_for_cat = ".*svn: E170001: Authorization failed.*"
+

Do you mean to reinstate errorcodes(E175013, E175013, E175009) check ?

With regards
Kamesh Jayachandran

RE: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Kamesh Jayachandran <ka...@collab.net>.
>> >>Bad idea to hard code so much of the specific message we're generating
>> >>today; it's bound to change later.
>> >
>> >>(eg, the XML parsing thing would ideally go away at some point)
>> >
>> >>Just 'Access.*${mu_url}.*forbidden' is enough IMO.
>> >
>> >
>> > Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would
>> > remove it as soon as I reach before my working copy.

>Thanks.  But why remove the E170001?  Its very purpose is to provide
>a machine-readable identification of the error... (exactly what tests
>need)


In r1068802 We did the following,

-  expected_error_for_cat = "svn: E175013: Unable to connect to a repository"+ \
-                            " at URL '" + mu_url + "'\n" + \
-                            "svn: E175013: Access to '/" + mu_repo_path + \
-                            "' forbidden\n" + \
-                            "svn: E175009: XML parsing failed: (403 Forbidden)"
 
+  if sbox.repo_url.startswith("http"):
+    expected_error_for_cat = ".*[Ff]orbidden.*"
+  else:
+    expected_error_for_cat = ".*svn: E170001: Authorization failed.*"
+

Do you mean to reinstate errorcodes(E175013, E175013, E175009) check ?

With regards
Kamesh Jayachandran

Re: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Hyrum K Wright wrote on Fri, Feb 11, 2011 at 18:09:14 +0000:
> On Fri, Feb 11, 2011 at 5:59 PM, Kamesh Jayachandran <ka...@collab.net> wrote:
> >>kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
> >>> +  expected_error_for_cat = "svn: E175013: Unable to connect to a
> >>> repository"+ \
> >>> +                            " at URL '" + mu_url + "'\n" + \
> >>> +                            "svn: E175013: Access to '/" + mu_repo_path
> >>> + \
> >>> +                            "' forbidden\n" + \
> >>> +                            "svn: E175009: XML parsing failed: (403
> >>> Forbidden)"
> >
> >>Bad idea to hard code so much of the specific message we're generating
> >>today; it's bound to change later.
> >
> >>(eg, the XML parsing thing would ideally go away at some point)
> >
> >>Just 'Access.*${mu_url}.*forbidden' is enough IMO.
> >
> >
> > Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would
> > remove it as soon as I reach before my working copy.

Thanks.  But why remove the E170001?  Its very purpose is to provide
a machine-readable identification of the error... (exactly what tests
need)

Re: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Hyrum K Wright wrote on Fri, Feb 11, 2011 at 18:09:14 +0000:
> On Fri, Feb 11, 2011 at 5:59 PM, Kamesh Jayachandran <ka...@collab.net> wrote:
> >>kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
> >>> +  expected_error_for_cat = "svn: E175013: Unable to connect to a
> >>> repository"+ \
> >>> +                            " at URL '" + mu_url + "'\n" + \
> >>> +                            "svn: E175013: Access to '/" + mu_repo_path
> >>> + \
> >>> +                            "' forbidden\n" + \
> >>> +                            "svn: E175009: XML parsing failed: (403
> >>> Forbidden)"
> >
> >>Bad idea to hard code so much of the specific message we're generating
> >>today; it's bound to change later.
> >
> >>(eg, the XML parsing thing would ideally go away at some point)
> >
> >>Just 'Access.*${mu_url}.*forbidden' is enough IMO.
> >
> >
> > Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would
> > remove it as soon as I reach before my working copy.

Thanks.  But why remove the E170001?  Its very purpose is to provide
a machine-readable identification of the error... (exactly what tests
need)

Re: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Hyrum K Wright <hy...@hyrumwright.org>.
On Fri, Feb 11, 2011 at 5:59 PM, Kamesh Jayachandran <ka...@collab.net> wrote:
>>kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
>>> +  expected_error_for_cat = "svn: E175013: Unable to connect to a
>>> repository"+ \
>>> +                            " at URL '" + mu_url + "'\n" + \
>>> +                            "svn: E175013: Access to '/" + mu_repo_path
>>> + \
>>> +                            "' forbidden\n" + \
>>> +                            "svn: E175009: XML parsing failed: (403
>>> Forbidden)"
>
>>Bad idea to hard code so much of the specific message we're generating
>>today; it's bound to change later.
>
>>(eg, the XML parsing thing would ideally go away at some point)
>
>>Just 'Access.*${mu_url}.*forbidden' is enough IMO.
>
>
> Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would
> remove it as soon as I reach before my working copy.

Note that instead of having to parse the error yourself, you can now
just give the error code for the expected error, and it should Do The
Right Thing.  (Error codes can be found in svntest.err)

-Hyrum

Re: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Hyrum K Wright <hy...@hyrumwright.org>.
On Fri, Feb 11, 2011 at 5:59 PM, Kamesh Jayachandran <ka...@collab.net> wrote:
>>kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
>>> +  expected_error_for_cat = "svn: E175013: Unable to connect to a
>>> repository"+ \
>>> +                            " at URL '" + mu_url + "'\n" + \
>>> +                            "svn: E175013: Access to '/" + mu_repo_path
>>> + \
>>> +                            "' forbidden\n" + \
>>> +                            "svn: E175009: XML parsing failed: (403
>>> Forbidden)"
>
>>Bad idea to hard code so much of the specific message we're generating
>>today; it's bound to change later.
>
>>(eg, the XML parsing thing would ideally go away at some point)
>
>>Just 'Access.*${mu_url}.*forbidden' is enough IMO.
>
>
> Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would
> remove it as soon as I reach before my working copy.

Note that instead of having to parse the error yourself, you can now
just give the error code for the expected error, and it should Do The
Right Thing.  (Error codes can be found in svntest.err)

-Hyrum

RE: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Kamesh Jayachandran <ka...@collab.net>.
>kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
>> +  expected_error_for_cat = "svn: E175013: Unable to connect to a repository"+ \
>> +                            " at URL '" + mu_url + "'\n" + \
>> +                            "svn: E175013: Access to '/" + mu_repo_path + \
>> +                            "' forbidden\n" + \
>> +                            "svn: E175009: XML parsing failed: (403 Forbidden)"

>Bad idea to hard code so much of the specific message we're generating
>today; it's bound to change later.

>(eg, the XML parsing thing would ideally go away at some point)

>Just 'Access.*${mu_url}.*forbidden' is enough IMO.


Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would remove it as soon as I reach before my working copy.

With regards
Kamesh Jayachandran

RE: svn commit: r1068411 - /subversion/trunk/subversion/tests/cmdline/authz_tests.py

Posted by Kamesh Jayachandran <ka...@collab.net>.
>kameshj@apache.org wrote on Tue, Feb 08, 2011 at 14:25:06 -0000:
>> +  expected_error_for_cat = "svn: E175013: Unable to connect to a repository"+ \
>> +                            " at URL '" + mu_url + "'\n" + \
>> +                            "svn: E175013: Access to '/" + mu_repo_path + \
>> +                            "' forbidden\n" + \
>> +                            "svn: E175009: XML parsing failed: (403 Forbidden)"

>Bad idea to hard code so much of the specific message we're generating
>today; it's bound to change later.

>(eg, the XML parsing thing would ideally go away at some point)

>Just 'Access.*${mu_url}.*forbidden' is enough IMO.


Thanks We fixed this in r1068802 Still we have "E170001:" for svnserve would remove it as soon as I reach before my working copy.

With regards
Kamesh Jayachandran