This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch rebase/access-2023
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit cd6c46c11522f3a105702365a882607c9723af63
Author: Jan Lehnardt <[email protected]>
AuthorDate: Sat Aug 6 17:49:13 2022 +0200

    fix(access): elixir tests
---
 test/elixir/test/proxyauth_test.exs           | 2 --
 test/elixir/test/security_validation_test.exs | 2 +-
 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 9f585cb1e..d6090a80c 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",

Reply via email to