diff options
author | Christopher Astfalk <christopher.astfalk@icloud.com> | 2021-04-13 18:50:49 +0200 |
---|---|---|
committer | Bessenyei Balázs Donát <bessbd@users.noreply.github.com> | 2021-05-05 10:31:38 +0200 |
commit | 5f8e3741e1cef18872e4155d9c93ec619ab568eb (patch) | |
tree | 11e07a2b56031dee981b8c86353329861e863691 | |
parent | ba8b1674f04ce08f9166dbb5820a7f8d3f7943c2 (diff) | |
download | couchdb-5f8e3741e1cef18872e4155d9c93ec619ab568eb.tar.gz |
Test speed up
-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 34fae198b..7c678c4f0 100644 --- a/test/elixir/test/users_db_test.exs +++ b/test/elixir/test/users_db_test.exs @@ -300,8 +300,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", @@ -386,51 +385,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", |