-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Dependencies > Fix Failing Tests #83
Comments
So now we need to a bit of refactoring in |
Oops! Was there a particular reason why `Auth` was getting its session configuration from `auth-plug`?
… On 14 Jul 2020, at 11:17, Nelson ***@***.***> wrote:
auth_plug had a breaking change where AuthPlug.session_options/0 was removed in https://github.com/dwyl/auth_plug/pull/20/files#diff-1560d1759954bb80cc81c6769976610fL68 <https://github.com/dwyl/auth_plug/pull/20/files#diff-1560d1759954bb80cc81c6769976610fL68>
<https://user-images.githubusercontent.com/194400/87414288-79bdd500-c5c3-11ea-8a4f-bbf060525c34.png>
So now we need to a bit of refactoring in auth to not invoke the unavailable function.
<https://user-images.githubusercontent.com/194400/87413611-6c541b00-c5c2-11ea-86b8-820eb8c07ff9.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#83 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACFLAIDFPOKHGBXMADYZWJLR3QWCDANCNFSM4OZK7XDQ>.
|
@th0mas not really. it was just a way of keeping the |
After I made the same update to the
Looking into it now. |
It's not just the tests that fail on If I downgrade From the stack trace I suspect this is a Cowboy issue (using the incorrect version of TLS).
|
Still getting the error ... but this looks like a promising line of enquiry: https://elixirforum.com/t/erlang-v-23-0-and-httpoison-error/31615/7 |
OK, back to
The session needs to be started at the beginning of the request lifecycle to avoid seeing the error:
That's why we had: Line 40 in 946f6ba
I'm going to keep digging. ⏳ |
Ok, after a bit of digging, it turns out a new helper method was added to If we update a test from: test "lists all apikeys", %{conn: conn} do
person = Auth.Person.get_person_by_email(@email)
conn = AuthPlug.create_jwt_session(conn, %{email: @email, id: person.id})
conn = get(conn, Routes.apikey_path(conn, :index))
assert html_response(conn, 200) =~ "Auth API Keys"
end To: test "lists all apikeys", %{conn: conn} do
person = Auth.Person.get_person_by_email(@email)
conn = conn
|> init_test_session(foo: "bar") # auth/issues/83
|> AuthPlug.create_jwt_session(%{email: @email, id: person.id})
|> get(Routes.apikey_path(conn, :index))
assert html_response(conn, 200) =~ "Auth API Keys"
end It passes!! 🎉 Going to make the changes to all the failing tests and see how far I get. 🤞 |
setup %{endpoint: endpoint} do
test_conn =
conn(:get, "endpoint")
|> init_test_session(%{})
{:ok, conn: test_conn}
|
To reduce LOC in tests, you can move |
@th0mas putting |
Done & merged |
3 of our dependencies are out-of-date because we published new versions of

fields
and auth_plugand a new version of
plug_cowboy` was released. https://libraries.io/hex/authTodo
before
working on RBAC Research and Writeup RBAC Systems #82 so we have a clean slate.The text was updated successfully, but these errors were encountered: