Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1563

Bug in test suite

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.2
    • 1.3
    • Test Suite
    • None

    Description

      My nginx.conf is a bit different from suggested at your site - it allows to pass tests with slashes in db name test_suite_db%2Fwith_slashes

      <code>
      location = /db

      { include proxy.conf; proxy_redirect off; proxy_pass http://192.168.0.13:5984/; break; }

      location ^~ /db/ {
      include proxy.conf;
      proxy_redirect off;
      if ( $request_uri ~ ^/db/(.*) )

      { # this line of code prevents nginx from decoding original uri proxy_pass http://192.168.0.13:5984/$1; }

      break;
      }
      </code>

      There is a problem in test suites scripts, sometimes urlPrefix is missing from request. For example in the following fragment from content_negotiation test
      <code>
      // with no accept header
      var req = CouchDB.newXhr();
      req.open("GET", "/test_suite_db/", false);
      req.send("");
      TEquals("text/plain; charset=utf-8", req.getResponseHeader("Content-Type"));
      </code>

      as a result of it the false GET request is sent - http://mysite/test_suit_db/ instead of http://mysite/db/test_suit_db/ and test fails.

      Attachments

        1. patch.txt
          5 kB
          Keks Keksov

        Activity

          People

            dch Dave Cottlehuber
            keksov Keks Keksov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: