anchor.diff:  -include_lib("couchdb/couch_db.hrl").
   
   -define(ADMIN_USER, {user_ctx, #user_ctx{roles=[<<"_admin">>]}}).
  +-define(DELAY, 100).
   -define(TIMEOUT, 1000).
  +
   
   start() ->
       {ok, Pid} = couch_server_sup:start_link(?CONFIG_CHAIN),
  
positive.code:     "http://" ++ Addr ++ ":" ++ Port ++ "/" ++ ?b2l(DbName).
  
  query_view(DbName, DDoc, View) ->
      {ok, Code, _Headers, Body} = test_request:get(
          db_url(DbName) ++ "/_design/" ++ DDoc ++ "/_view/" ++ View),
      ?assertEqual(200, Code),
      Body.
  
  view_cleanup(DbName) ->
      {ok, Db} = couch_db:open(DbName, [?ADMIN_USER]),
      couch_mrview:cleanup(Db),
      couch_db:close(Db).
  
  count_index_files(DbName) ->
      % call server to fetch the index files
  
negative.code: teardown({DbName, _}) ->
      teardown(DbName);
  teardown(DbName) when is_binary(DbName) ->
      couch_server:delete(DbName, [?ADMIN_USER]),
      ok.
  
  
  