couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couchdb commit: updated refs/heads/master to 638b5cb
Date Mon, 04 Jul 2016 14:02:43 GMT
Repository: couchdb
Updated Branches:
  refs/heads/master 0fef309cc -> 638b5cb5d


fix attachments.js test


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/638b5cb5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/638b5cb5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/638b5cb5

Branch: refs/heads/master
Commit: 638b5cb5d0f8a5527acffc9d1d2a0d8e6410e0ef
Parents: 0fef309
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Jul 4 14:29:45 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Jul 4 15:00:40 2016 +0100

----------------------------------------------------------------------
 test/javascript/tests/attachments.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/638b5cb5/test/javascript/tests/attachments.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/attachments.js b/test/javascript/tests/attachments.js
index b3b2e2f..1baea65 100644
--- a/test/javascript/tests/attachments.js
+++ b/test/javascript/tests/attachments.js
@@ -217,7 +217,10 @@ couchTests.attachments= function(debug) {
 */
 
   // test large attachments - COUCHDB-366
-  var lorem = CouchDB.request("GET", "http://localhost:15984/_utils/test/lorem.txt").responseText;
+  var lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '
+  for (var i=0; i<64; i++) {
+    lorem = lorem + lorem;
+  }
   var xhr = CouchDB.request("PUT", "/" + db_name + "/bin_doc5/lorem.txt", {
     headers:{"Content-Type":"text/plain;charset=utf-8"},
     body:lorem
@@ -230,8 +233,10 @@ couchTests.attachments= function(debug) {
   TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   // test large inline attachment too
-  var lorem_b64 = CouchDB.request("GET", "http://localhost:15984/_utils/test/lorem_b64.txt");
-  lorem_b64 = lorem_b64.responseText;
+  var lorem_b64 = 'TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4g'
+  for (var i=0; i<64; i++) {
+    lorem_b64 = lorem_b64 + lorem_b64;
+  }
   var doc = db.open("bin_doc5", {attachments:true});
   TEquals(lorem_b64, doc._attachments["lorem.txt"].data, 'binary attachment data should match');
 


Mime
View raw message