anchor.diff:      set_config("couchdb_peruser", "enable", "false"),
       set_config("couchdb_peruser", "delete_dbs", "false"),
       do_request(delete, get_base_url() ++ "/" ++ ?b2l(TestAuthDb)),
  +    lists:foreach(fun (DbName) ->
  +        delete_db(DbName)
  +    end, all_dbs()),
       config:delete("admins", ?ADMIN_USERNAME).
   
   set_config(Section, Key, Value) ->
  
positive.code:         get_base_url(), "/", ?b2l(AuthDb), "/org.couchdb.user:", Name]),
      {ok, 201, _, _} = do_request(put, Url, Body),
      % let's proceed after giving couchdb_peruser some time to create the user db
      timer:sleep(50).
  
  delete_user(AuthDb, Name) ->
      Url = lists:concat([get_base_url(), "/", ?b2l(AuthDb),
  
negative.code:     Rev = proplists:get_value(<<"_rev">>, DocProps),
      {ok, 200, _, _} = do_request(delete, Url ++ "?rev=" ++ ?b2l(Rev)),
      % let's proceed after giving couchdb_peruser some time to delete the user db
      timer:sleep(1000).
  
  get_security(DbName) ->
      Url = lists:concat([
          get_cluster_base_url(), "/", ?b2l(DbName), "/_security"]),
      {ok, 200, _, Body} = do_request(get, Url),
      {SecurityProperties} = jiffy:decode(Body),
      SecurityProperties.
  
  set_security(DbName, SecurityProperties) ->
      Url = lists:concat([
          get_cluster_base_url(), "/", ?b2l(DbName), "/_security"]),
      Body = jiffy:encode({SecurityProperties}),
      {ok, 200, _, _} = do_request(put, Url, Body).
  
  all_dbs() ->
      {ok, 200, _, Body} = do_request(get, get_cluster_base_url() ++ "/_all_dbs"),
  