diff options
author | Jan Lehnardt <jan@apache.org> | 2022-08-06 17:49:13 +0200 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2022-12-16 16:56:18 +0100 |
commit | 3776dca5bde1bc7549e81d862c95deee32b91213 (patch) | |
tree | 3577a9bca8eb26b729bdb43d65db3956f039a9a8 | |
parent | a443c037de042dcf30e756ff5c6f54efea62ef32 (diff) | |
download | couchdb-3776dca5bde1bc7549e81d862c95deee32b91213.tar.gz |
fix(access): elixir tests
-rw-r--r-- | test/elixir/test/proxyauth_test.exs | 2 | ||||
-rw-r--r-- | test/elixir/test/security_validation_test.exs | 2 | ||||
-rw-r--r-- | test/elixir/test/users_db_security_test.exs | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/test/elixir/test/proxyauth_test.exs b/test/elixir/test/proxyauth_test.exs index ea57c1a0e..2c6e3d530 100644 --- a/test/elixir/test/proxyauth_test.exs +++ b/test/elixir/test/proxyauth_test.exs @@ -5,7 +5,6 @@ defmodule ProxyAuthTest do @tag :with_db test "proxy auth with secret" do - users_db_name = random_db_name() create_db(users_db_name) @@ -79,7 +78,6 @@ defmodule ProxyAuthTest do @tag :with_db test "proxy auth without secret" do - users_db_name = random_db_name() create_db(users_db_name) diff --git a/test/elixir/test/security_validation_test.exs b/test/elixir/test/security_validation_test.exs index 2bb87fd83..c147ddd03 100644 --- a/test/elixir/test/security_validation_test.exs +++ b/test/elixir/test/security_validation_test.exs @@ -149,7 +149,7 @@ defmodule SecurityValidationTest do headers = @auth_headers[:jerry] resp = Couch.get("/_session", headers: headers) assert resp.body["userCtx"]["name"] == "jerry" - assert info["userCtx"]["roles"] == ["_users"] + assert resp.body["userCtx"]["roles"] == ["_users"] end @tag :with_db diff --git a/test/elixir/test/users_db_security_test.exs b/test/elixir/test/users_db_security_test.exs index 656749040..3945d2bfa 100644 --- a/test/elixir/test/users_db_security_test.exs +++ b/test/elixir/test/users_db_security_test.exs @@ -400,11 +400,11 @@ defmodule UsersDbSecurityTest do # admin should be able to read from any view resp = view_as(@users_db, "user_db_auth/test", user: "jerry") - assert resp.body["total_rows"] == 3 + assert resp.body["total_rows"] == 4 # db admin should be able to read from any view resp = view_as(@users_db, "user_db_auth/test", user: "speedy") - assert resp.body["total_rows"] == 3 + assert resp.body["total_rows"] == 4 # non-admins can't read design docs open_as(@users_db, "_design/user_db_auth", @@ -419,7 +419,7 @@ defmodule UsersDbSecurityTest do request_raw_as(@users_db, "_design/user_db_auth/_list/names/test", user: "jerry") assert result.status_code == 200 - assert length(String.split(result.body, "\n")) == 4 + assert length(String.split(result.body, "\n")) == 5 # non-admins can't read _list request_raw_as(@users_db, "_design/user_db_auth/_list/names/test", |