diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-01-29 22:43:33 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-01-29 22:43:33 +0000 |
commit | ee09a0de9f8356abe24a0ac0f26cdff35f8fa704 (patch) | |
tree | 1cf02264f5ee72216e5add7deda235c1504cf5ec /test/etap/030-doc-from-json.t | |
parent | 5affb01e4ee059ad9b82000625f2bdc989019a16 (diff) |
Allow storing attachments in compressed form. Closes COUCHDB-583. Thanks Filipe Manana
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@904650 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap/030-doc-from-json.t')
-rwxr-xr-x | test/etap/030-doc-from-json.t | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/etap/030-doc-from-json.t b/test/etap/030-doc-from-json.t index dc3327aa..359a75f9 100755 --- a/test/etap/030-doc-from-json.t +++ b/test/etap/030-doc-from-json.t @@ -17,7 +17,11 @@ %% XXX: Figure out how to -include("couch_db.hrl") -record(doc, {id= <<"">>, revs={0, []}, body={[]}, atts=[], deleted=false, meta=[]}). --record(att, {name, type, len, md5= <<>>, revpos=0, data}). +-record(att, {name, type, att_len, disk_len, md5= <<>>, revpos=0, data, + comp=false}). + +default_config() -> + test_util:build_file("etc/couchdb/default_dev.ini"). main(_) -> test_util:init_code_path(), @@ -32,6 +36,8 @@ main(_) -> ok. test() -> + couch_config:start_link([default_config()]), + couch_config:set("attachments", "compression_level", "0"), ok = test_from_json_success(), ok = test_from_json_errors(), ok. @@ -85,13 +91,15 @@ test_from_json_success() -> name = <<"my_attachment.fu">>, data = stub, type = <<"application/awesome">>, - len = 45 + att_len = 45, + disk_len = 45 }, #att{ name = <<"noahs_private_key.gpg">>, data = <<"I have a pet fish!">>, type = <<"application/pgp-signature">>, - len = 18 + att_len = 18, + disk_len = 18 } ]}, "Attachments are parsed correctly." |