davisp commented on a change in pull request #2666: soft-deletion for database
URL: https://github.com/apache/couchdb/pull/2666#discussion_r400291193
##########
File path: src/fabric/test/fabric2_db_crud_tests.erl
##########
@@ -139,6 +146,44 @@ recreate_db(_) ->
?assertError(database_does_not_exist, fabric2_db:open(DbName, BadOpts)).
+undelete_db(_) ->
+ DbName = ?tempdb(),
+ ?assertError(database_does_not_exist, fabric2_db:delete(DbName, [])),
+
+ ?assertMatch({ok, _}, fabric2_db:create(DbName, [])),
+ ?assertEqual(true, ets:member(fabric2_server, DbName)),
+
+ ok = config:set("couchdb", "enable_database_recovery", "true", false),
+ ?assertEqual(ok, fabric2_db:delete(DbName, [])),
+ ok = config:delete("couchdb", "enable_database_recovery", false),
Review comment:
We can remove these calls undoing the config change now that we have the
call in the cleanup (unless you have a test that's making assertions with and
without it on of course).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services