Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a test for COUCHDB-1319

  • Loading branch information...
commit ce3d813049d7e58a7ea966f1499b3d33b33c0342 1 parent c923e87
@kocolosk kocolosk authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 test/etap/011-file-headers.t
View
9 test/etap/011-file-headers.t
@@ -22,7 +22,7 @@ main(_) ->
{S1, S2, S3} = now(),
random:seed(S1, S2, S3),
- etap:plan(17),
+ etap:plan(18),
case (catch test()) of
ok ->
etap:end_tests();
@@ -68,6 +68,13 @@ test() ->
etap:is({ok, Size2}, couch_file:bytes(Fd),
"Rewriting the same second header returns the same second size."),
+ couch_file:write_header(Fd, erlang:make_tuple(5000, <<"CouchDB">>)),
+ etap:is(
+ couch_file:read_header(Fd),
+ {ok, erlang:make_tuple(5000, <<"CouchDB">>)},
+ "Headers larger than the block size can be saved (COUCHDB-1319)"
+ ),
+
ok = couch_file:close(Fd),
% Now for the fun stuff. Try corrupting the second header and see
Please sign in to comment.
Something went wrong with that request. Please try again.