File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ alias Ecto.Integration.TestRepo
1818Application . put_env ( :ecto_sql , TestRepo ,
1919 url: Application . get_env ( :ecto_sql , :mysql_test_url ) <> "/ecto_test" ,
2020 pool: Ecto.Adapters.SQL.Sandbox ,
21- show_sensitive_data_on_connection_error: true
21+ show_sensitive_data_on_connection_error: true ,
22+ log: false
2223)
2324
2425defmodule Ecto.Integration.TestRepo do
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ alias Ecto.Integration.TestRepo
1818Application . put_env ( :ecto_sql , TestRepo ,
1919 url: Application . get_env ( :ecto_sql , :pg_test_url ) <> "/ecto_test" ,
2020 pool: Ecto.Adapters.SQL.Sandbox ,
21- show_sensitive_data_on_connection_error: true
21+ show_sensitive_data_on_connection_error: true ,
22+ log: false
2223)
2324
2425defmodule Ecto.Integration.TestRepo do
Original file line number Diff line number Diff line change @@ -133,16 +133,16 @@ defmodule Ecto.Integration.LoggingTest do
133133 end
134134
135135 test "with a log: true override when logging is disabled" do
136- repo_conf = Application . get_env ( :ecto_sql , TestRepo )
137-
138- on_exit ( fn -> Application . put_env ( :ecto_sql , TestRepo , repo_conf ) end )
139-
140- Application . put_env ( :ecto_sql , TestRepo , log: false )
141-
142136 refute capture_log ( fn ->
143137 TestRepo . insert! ( % Post { title: "1" } , log: true )
144138 end ) =~ "an exception was raised logging"
145139 end
140+
141+ test "with unspecified :log option when logging is disabled" do
142+ refute capture_log ( fn ->
143+ TestRepo . insert! ( % Post { title: "1" } )
144+ end ) =~ "an exception was raised logging"
145+ end
146146 end
147147
148148 describe "parameter logging" do
Original file line number Diff line number Diff line change @@ -81,7 +81,8 @@ Application.put_env(
8181 url: Application . get_env ( :ecto_sql , :tds_test_url ) <> "/ecto_test" ,
8282 pool: Ecto.Adapters.SQL.Sandbox ,
8383 set_allow_snapshot_isolation: :on ,
84- show_sensitive_data_on_connection_error: true
84+ show_sensitive_data_on_connection_error: true ,
85+ log: false
8586)
8687
8788defmodule Ecto.Integration.TestRepo do
Original file line number Diff line number Diff line change @@ -1073,7 +1073,7 @@ defmodule Ecto.Adapters.SQL do
10731073 { false , _level } ->
10741074 :ok
10751075
1076- { true , false } ->
1076+ { opts_level , false } when opts_level in [ nil , true ] ->
10771077 :ok
10781078
10791079 { true , level } ->
You can’t perform that action at this time.
0 commit comments