summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristopher Astfalk <christopher.astfalk@icloud.com>2021-04-13 18:50:49 +0200
committerJan Lehnardt <jan@apache.org>2021-04-19 19:06:58 +0200
commitb4939ffde18f8f70b4f62e95a3f6ee0ff706f5dc (patch)
tree580233543fca0a9b0a8c2ef0dd34f48dee9c15cc /test
parent5c1739fb7e8b56cced4019b5efd30092d3a44f3b (diff)
downloadcouchdb-b4939ffde18f8f70b4f62e95a3f6ee0ff706f5dc.tar.gz
Test speed up
Diffstat (limited to 'test')
-rw-r--r--test/elixir/test/users_db_test.exs31
1 files changed, 9 insertions, 22 deletions
diff --git a/test/elixir/test/users_db_test.exs b/test/elixir/test/users_db_test.exs
index 9b75c14d7..fddb58bbe 100644
--- a/test/elixir/test/users_db_test.exs
+++ b/test/elixir/test/users_db_test.exs
@@ -299,8 +299,7 @@ defmodule UsersDbTest do
assert resp.body["userCtx"]["name"] == "foo@example.org"
end
- @tag :with_db
- test "users password requirements", context do
+ test "users password requirements", _context do
set_config({
"couch_httpd_auth",
"password_regexp",
@@ -385,51 +384,39 @@ defmodule UsersDbTest do
# With password that match all requirements.
jchris_user_doc6 = Map.put(jchris_user_doc, "password", "funnnnnyB0N3!")
save_as(@users_db_name, jchris_user_doc6, use_session: session, expect_response: 201)
- end
- @tag :with_db
- test "users password requirements with non list value", context do
+ # with non list value
set_config({
"couch_httpd_auth",
"password_regexp",
"{{\".{10,}\"}}"
})
- session = login("jan", "apple")
-
- jchris_user_doc =
+ joe_user_doc =
prepare_user_doc([
- {:name, "jchris@apache.org"},
- {:password, "funnybone"}
+ {:name, "joe_erlang"},
+ {:password, "querty"}
])
+
save_as(
@users_db_name,
- jchris_user_doc,
+ joe_user_doc,
use_session: session,
expect_response: 403,
error_message: "forbidden",
error_reason: "Server cannot hash passwords at this time."
)
- end
- @tag :with_db
- test "users password requirements with not correct syntax", context do
+ # Not correct syntax
set_config({
"couch_httpd_auth",
"password_regexp",
"[{\".{10,}\"]"
})
- session = login("jan", "apple")
-
- jchris_user_doc =
- prepare_user_doc([
- {:name, "jchris@apache.org"},
- {:password, "funnybone"}
- ])
save_as(
@users_db_name,
- jchris_user_doc,
+ joe_user_doc,
use_session: session,
expect_response: 403,
error_message: "forbidden",