Skip to content

Commit

Permalink
Remove :ssl.start()
Browse files Browse the repository at this point in the history
SSL application is managed by myxql and postgrex
  • Loading branch information
msmithstubbs committed Aug 31, 2023
1 parent 1b6f9e8 commit db6404f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 42 deletions.
2 changes: 0 additions & 2 deletions lib/kino_db/connection_cell.ex
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ defmodule KinoDB.ConnectionCell do
quote do
opts = unquote(shared_options(attrs))

if opts[:ssl] == true, do: :ssl.start()
{:ok, unquote(quoted_var(attrs["variable"]))} = Kino.start_child({Postgrex, opts})
end
end
Expand All @@ -207,7 +206,6 @@ defmodule KinoDB.ConnectionCell do
quote do
opts = unquote(shared_options(attrs))

if opts[:ssl] == true, do: :ssl.start()
{:ok, unquote(quoted_var(attrs["variable"]))} = Kino.start_child({MyXQL, opts})
end
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule KinoDB.MixProject do
[
{:kino, "~> 0.7"},
{:table, "~> 0.1.2"},
{:postgrex, "~> 0.16.3 or ~> 0.17", optional: true},
{:postgrex, "~> 0.16.3 or ~> 0.17.3 or ~> 0.18", optional: true},
{:exqlite, "~> 0.11", optional: true},
{:myxql, "~> 0.6.2 or ~> 0.7", optional: true},
{:db_connection, "~> 2.4.2", optional: true},
Expand Down
39 changes: 0 additions & 39 deletions test/kino_db/connection_cell_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ defmodule KinoDB.ConnectionCellTest do
assert source ==
"""
opts = [hostname: "localhost", port: 5432, username: "", password: "", database: ""]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, conn} = Kino.start_child({Postgrex, opts})\
"""
end
Expand All @@ -73,10 +68,6 @@ defmodule KinoDB.ConnectionCellTest do
database: "default"
]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, db} = Kino.start_child({Postgrex, opts})\
'''

Expand All @@ -92,10 +83,6 @@ defmodule KinoDB.ConnectionCellTest do
socket_options: [:inet6]
]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, db} = Kino.start_child({Postgrex, opts})\
'''

Expand All @@ -111,10 +98,6 @@ defmodule KinoDB.ConnectionCellTest do
ssl: true
]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, db} = Kino.start_child({Postgrex, opts})\
'''

Expand All @@ -129,10 +112,6 @@ defmodule KinoDB.ConnectionCellTest do
database: "default"
]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, db} = Kino.start_child({Postgrex, opts})\
'''

Expand All @@ -145,10 +124,6 @@ defmodule KinoDB.ConnectionCellTest do
database: "default"
]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, db} = Kino.start_child({MyXQL, opts})\
'''

Expand Down Expand Up @@ -229,11 +204,6 @@ defmodule KinoDB.ConnectionCellTest do

assert_smart_cell_update(kino, %{"hostname" => "myhost"}, """
opts = [hostname: "myhost", port: 5432, username: "", password: "", database: ""]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, conn} = Kino.start_child({Postgrex, opts})\
""")
end
Expand All @@ -260,11 +230,6 @@ defmodule KinoDB.ConnectionCellTest do

assert_smart_cell_update(kino, %{"type" => "mysql", "port" => 3306}, """
opts = [hostname: "localhost", port: 3306, username: "", password: "", database: ""]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, conn} = Kino.start_child({MyXQL, opts})\
""")
end
Expand Down Expand Up @@ -295,10 +260,6 @@ defmodule KinoDB.ConnectionCellTest do
database: ""
]
if opts[:ssl] == true do
:ssl.start()
end
{:ok, conn} = Kino.start_child({Postgrex, opts})\
"""
)
Expand Down

0 comments on commit db6404f

Please sign in to comment.