summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@apache.org>2017-07-18 08:21:36 -0700
committerILYA Khlopotov <iilyak@apache.org>2017-07-18 08:28:42 -0700
commit6a559cf3cf8cb95e2b441bc03e9b9621931a6bb4 (patch)
tree5ff4b932e5af8bf77456246dee418c603a715697
parent3e14510b4578c846f01fb4bb1e461dad75af29e9 (diff)
downloadcouchdb-6a559cf3cf8cb95e2b441bc03e9b9621931a6bb4.tar.gz
Use random name for _users db in test
We should use random names for databases. Otherwise the test fails with database already exists error. This commit uses random name for users db and corrects the section name for `authentication_db` setting. COUCHDB-3367
-rw-r--r--src/chttpd/test/chttpd_security_tests.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chttpd/test/chttpd_security_tests.erl b/src/chttpd/test/chttpd_security_tests.erl
index bcd04c22e..8f70b654f 100644
--- a/src/chttpd/test/chttpd_security_tests.erl
+++ b/src/chttpd/test/chttpd_security_tests.erl
@@ -35,9 +35,10 @@
setup() ->
Hashed = couch_passwords:hash_admin_password(?PASS),
ok = config:set("admins", ?USER, ?b2l(Hashed), _Persist=false),
- UserDb = <<"_users">>,
+ UserDb = ?tempdb(),
TmpDb = ?tempdb(),
- ok = config:set("couch_httpd_auth", "authentication_db", ?b2l(UserDb)),
+ ok = config:set("chttpd_auth", "authentication_db", ?b2l(UserDb)),
+
Addr = config:get("chttpd", "bind_address", "127.0.0.1"),
Port = mochiweb_socket_server:get(chttpd, port),
BaseUrl = lists:concat(["http://", Addr, ":", Port, "/"]),