Skip to content

Commit

Permalink
Update dependencies with warnings (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerWitt authored Jan 13, 2025
1 parent c3097f4 commit 9748fcb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
- pg:
version: 14
pair:
elixir: 1.17.1
otp: 25.3
elixir: 1.18.1
otp: 27.2
lint: lint
env:
MIX_ENV: test
Expand Down
5 changes: 2 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
%{
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
"db_connection": {:hex, :db_connection, "2.4.1", "6411f6e23f1a8b68a82fa3a36366d4881f21f47fc79a9efb8c615e62050219da", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ea36d226ec5999781a9a8ad64e5d8c4454ecedc7a4d643e4832bf08efca01f00"},
"db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"},
"decimal": {:hex, :decimal, "1.9.0", "83e8daf59631d632b171faabafb4a9f4242c514b0a06ba3df493951c08f64d07", [:mix], [], "hexpm", "b1f2343568eed6928f3e751cf2dffde95bfaa19dd95d09e8a9ea92ccfd6f7d85"},
"earmark_parser": {:hex, :earmark_parser, "1.4.41", "ab34711c9dc6212dda44fcd20ecb87ac3f3fce6f0ca2f28d4a00e4154f8cd599", [:mix], [], "hexpm", "a81a04c7e34b6617c2792e291b5a2e57ab316365c2644ddc553bb9ed863ebefa"},
"ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"},
"jason": {:hex, :jason, "1.1.1", "d3ccb840dfb06f2f90a6d335b536dd074db748b3e7f5b11ab61d239506585eb2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "639645cfac325e34938167b272bae0791fea3a34cf32c29525abf1d323ed4c18"},
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
"makeup_elixir": {:hex, :makeup_elixir, "1.0.0", "74bb8348c9b3a51d5c589bf5aebb0466a84b33274150e3b6ece1da45584afc82", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "49159b7d7d999e836bedaf09dcf35ca18b312230cf901b725a64f3f42e407983"},
"makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"},
Expand Down
2 changes: 1 addition & 1 deletion test/login_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ defmodule LoginTest do
assert {:ok, pid} = P.start_link(context[:options])
assert {:ok, %Postgrex.Result{}} = P.query(pid, "SELECT 123", [])

assert String.match?(P.parameters(pid)["server_version"], ~R"^\d+\.\d+")
assert String.match?(P.parameters(pid)["server_version"], ~r"^\d+\.\d+")
end

@tag min_pg_version: "9.0"
Expand Down
38 changes: 22 additions & 16 deletions test/postgrex_test.exs
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
defmodule PostgrexTest do
use ExUnit.Case, async: false
import ExUnit.CaptureLog
import ExUnit.CaptureLog, warn: false

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, ", ")
end

# invalid argument
Process.flag(:trap_exit, true)
search_path = "public, extension"
# gen_statem reports are only captured on Elixir v1.17+
# but a bug causes the Logger to crash on v1.17.0 and v1.17.1.
if Version.match?(System.version(), ">= 1.17.2") do
test "start_link/2 detects invalid search path" do
# invalid argument
Process.flag(:trap_exit, true)
search_path = "public, extension"

opts = [
database: "postgrex_test",
search_path: search_path,
show_sensitive_data_on_connection_error: true
]
opts = [
database: "postgrex_test",
search_path: search_path,
show_sensitive_data_on_connection_error: true
]

error_log =
capture_log(fn ->
Postgrex.start_link(opts)
assert_receive {:EXIT, _, :killed}
end)
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}\""
assert error_log =~ "expected :search_path to be a list of strings, got: \"#{search_path}\""
end
end
end

0 comments on commit 9748fcb

Please sign in to comment.