-
Notifications
You must be signed in to change notification settings - Fork 287
Update dependencies with warnings #723
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a8214c9
Bump db_connection
TylerWitt 4f25100
Bump Jason
TylerWitt c6883c7
Change sigil from deprecated sigil_R
TylerWitt 460c2b4
Bump Elixir 1.17 ver
TylerWitt 6aa8fb8
Bump Elixir versions
TylerWitt 29c4ccd
Apply suggestions from code review
josevalim 2429e2f
Conditionally skip test based on Elixir version
TylerWitt 27ad0dc
Split out happy path part of skipped test
TylerWitt 6650422
Clean up version check
TylerWitt db2ec96
Update test/postgrex_test.exs
TylerWitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
defmodule PostgrexTest do | ||
use ExUnit.Case, async: false | ||
import ExUnit.CaptureLog | ||
|
||
test "start_link/2 sets search path" do | ||
# valid argument | ||
search_path = ["public", "extension"] | ||
{:ok, conn} = Postgrex.start_link(database: "postgrex_test", search_path: search_path) | ||
%{rows: [[result]]} = Postgrex.query!(conn, "show search_path", []) | ||
assert result == Enum.join(search_path, ", ") | ||
# This test fails due to a bug betweem Elixir and Erlang in earlier versions of Elixir. | ||
if Version.match?(Version.parse!(System.version()), Version.parse_requirement!(">= 1.17.2")) do | ||
import ExUnit.CaptureLog | ||
|
||
# invalid argument | ||
Process.flag(:trap_exit, true) | ||
search_path = "public, extension" | ||
test "start_link/2 sets search path" do | ||
# valid argument | ||
search_path = ["public", "extension"] | ||
{:ok, conn} = Postgrex.start_link(database: "postgrex_test", search_path: search_path) | ||
%{rows: [[result]]} = Postgrex.query!(conn, "show search_path", []) | ||
assert result == Enum.join(search_path, ", ") | ||
TylerWitt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
opts = [ | ||
database: "postgrex_test", | ||
search_path: search_path, | ||
show_sensitive_data_on_connection_error: true | ||
] | ||
# invalid argument | ||
Process.flag(:trap_exit, true) | ||
search_path = "public, extension" | ||
|
||
error_log = | ||
capture_log(fn -> | ||
Postgrex.start_link(opts) | ||
assert_receive {:EXIT, _, :killed} | ||
end) | ||
opts = [ | ||
database: "postgrex_test", | ||
search_path: search_path, | ||
show_sensitive_data_on_connection_error: true | ||
] | ||
|
||
assert error_log =~ "expected :search_path to be a list of strings, got: \"#{search_path}\"" | ||
error_log = | ||
capture_log(fn -> | ||
Postgrex.start_link(opts) | ||
assert_receive {:EXIT, _, :killed} | ||
end) | ||
|
||
assert error_log =~ "expected :search_path to be a list of strings, got: \"#{search_path}\"" | ||
end | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.