diff options
author | Christopher Astfalk <christopher.astfalk@icloud.com> | 2021-04-13 18:50:49 +0200 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2021-04-19 19:06:58 +0200 |
commit | b4939ffde18f8f70b4f62e95a3f6ee0ff706f5dc (patch) | |
tree | 580233543fca0a9b0a8c2ef0dd34f48dee9c15cc /test | |
parent | 5c1739fb7e8b56cced4019b5efd30092d3a44f3b (diff) | |
download | couchdb-b4939ffde18f8f70b4f62e95a3f6ee0ff706f5dc.tar.gz |
Test speed up
Diffstat (limited to 'test')
-rw-r--r-- | test/elixir/test/users_db_test.exs | 31 |
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", |