subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1860951 - /subversion/trunk/subversion/tests/libsvn_ra/ra-test.c
Date Mon, 10 Jun 2019 15:07:57 GMT
Author: julianfoad
Date: Mon Jun 10 15:07:57 2019
New Revision: 1860951

URL: http://svn.apache.org/viewvc?rev=1860951&view=rev
Log:
Adjust expectations of a new test to account for differences between RA
layers. A follow-up to r1860936.

* subversion/tests/libsvn_ra/ra-test.c
  (test_get_deleted_rev_errors): Expect a generic error code when running
    over HTTP, otherwise the specific error code for this error case.

Modified:
    subversion/trunk/subversion/tests/libsvn_ra/ra-test.c

Modified: subversion/trunk/subversion/tests/libsvn_ra/ra-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_ra/ra-test.c?rev=1860951&r1=1860950&r2=1860951&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_ra/ra-test.c Mon Jun 10 15:07:57 2019
@@ -1856,15 +1856,22 @@ test_get_deleted_rev_errors(const svn_te
 {
   svn_ra_session_t *ra_session;
   svn_revnum_t revision_deleted;
+  svn_error_t *err;
 
   SVN_ERR(make_and_open_repos(&ra_session,
                               "test-repo-get-deleted-rev-errors", opts, pool));
   SVN_ERR(commit_changes(ra_session, pool));
 
   /* expect an error when searching up to r3, when repository head is r1 */
-  SVN_TEST_ASSERT_ERROR(svn_ra_get_deleted_rev(ra_session, "A", 1, 3,
-                                               &revision_deleted, pool),
-                        SVN_ERR_FS_NO_SUCH_REVISION);
+  err = svn_ra_get_deleted_rev(ra_session, "A", 1, 3, &revision_deleted, pool);
+
+  /* mod_dav_svn returns a generic error code for "500 Internal Server Error";
+   * the other RA layers return the specific error code for "no such revision".
+   * We should make these consistent, but for now that's how it is. */
+  if (opts->repos_url && strncmp(opts->repos_url, "http", 4) == 0)
+    SVN_TEST_ASSERT_ERROR(err, SVN_ERR_RA_DAV_REQUEST_FAILED);
+  else
+    SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_NO_SUCH_REVISION);
 
   return SVN_NO_ERROR;
 }



Mime
View raw message