couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From klaus_trai...@apache.org
Subject couchdb-peruser git commit: Improve `teardown/1` in test suite
Date Wed, 19 Aug 2015 13:04:44 GMT
Repository: couchdb-peruser
Updated Branches:
  refs/heads/master 033768ddf -> 7530ed1d7


Improve `teardown/1` in test suite

Only delete DBs if prefix is `userdb-`.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/commit/7530ed1d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/tree/7530ed1d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-peruser/diff/7530ed1d

Branch: refs/heads/master
Commit: 7530ed1d704eda4ee4aa132899b0f49fae1fd503
Parents: 033768d
Author: Klaus Trainer <klaus_trainer@posteo.de>
Authored: Wed Aug 19 15:01:31 2015 +0200
Committer: Klaus Trainer <klaus_trainer@posteo.de>
Committed: Wed Aug 19 15:01:34 2015 +0200

----------------------------------------------------------------------
 test/couchdb_peruser_test.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/7530ed1d/test/couchdb_peruser_test.erl
----------------------------------------------------------------------
diff --git a/test/couchdb_peruser_test.erl b/test/couchdb_peruser_test.erl
index 554f55b..3913d64 100644
--- a/test/couchdb_peruser_test.erl
+++ b/test/couchdb_peruser_test.erl
@@ -40,7 +40,10 @@ teardown(TestAuthDb) ->
     set_config("couchdb_peruser", "delete_dbs", "false"),
     do_request(delete, get_base_url() ++ "/" ++ ?b2l(TestAuthDb)),
     lists:foreach(fun (DbName) ->
-        delete_db(DbName)
+        case DbName of
+        <<"userdb-",_/binary>> -> delete_db(DbName);
+        _ -> ok
+        end
     end, all_dbs()).
 
 set_config(Section, Key, Value) ->


Mime
View raw message