You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/01/07 22:38:39 UTC
[couchdb] branch fix-elixir-cookie-auth-test created (now 589b05b)
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a change to branch fix-elixir-cookie-auth-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
at 589b05b Set the session correctly
This branch includes the following new commits:
new 589b05b Set the session correctly
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb] 01/01: Set the session correctly
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch fix-elixir-cookie-auth-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 589b05bfd1b0457bd99d1b26091838c08ec89a45
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue Jan 7 16:37:40 2020 -0600
Set the session correctly
Adam K noticed that we aren't setting the session cookie correctly which
appears to have made this test fail randomly. Why its random and not
consistent is currently unknown.
---
test/elixir/test/cookie_auth_test.exs | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/test/elixir/test/cookie_auth_test.exs b/test/elixir/test/cookie_auth_test.exs
index ac1110b..b10ee84 100644
--- a/test/elixir/test/cookie_auth_test.exs
+++ b/test/elixir/test/cookie_auth_test.exs
@@ -95,12 +95,9 @@ defmodule CookieAuthTest do
session = use_session || login_as(user)
resp =
- Couch.get(
- "/#{db_name}/#{URI.encode(doc_id)}",
- headers: [
- Cookie: session.cookie,
- "X-CouchDB-www-Authenticate": "Cookie"
- ]
+ Couch.Session.get(
+ session,
+ "/#{db_name}/#{URI.encode(doc_id)}"
)
if use_session == nil do
@@ -125,12 +122,9 @@ defmodule CookieAuthTest do
session = use_session || login_as(user)
resp =
- Couch.put(
+ Couch.Session.put(
+ session,
"/#{db_name}/#{URI.encode(doc["_id"])}",
- headers: [
- Cookie: session.cookie,
- "X-CouchDB-www-Authenticate": "Cookie"
- ],
body: doc
)
@@ -160,12 +154,9 @@ defmodule CookieAuthTest do
session = use_session || login_as(user)
resp =
- Couch.delete(
- "/#{db_name}/#{URI.encode(doc["_id"])}",
- headers: [
- Cookie: session.cookie,
- "X-CouchDB-www-Authenticate": "Cookie"
- ]
+ Couch.Session.delete(
+ session,
+ "/#{db_name}/#{URI.encode(doc["_id"])}"
)
if use_session == nil do