|
|
@ -53,12 +53,12 @@ defmodule Explorer.Repo.ConfigHelperTest do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
test "parse params from database url with special characters in password" do |
|
|
|
test "parse params from database url with special characters in password" do |
|
|
|
database_url = "postgresql://test_username:awN!l#W*g$P%t-l^q&d@hostname.test.com:7777/test_database" |
|
|
|
database_url = "postgresql://test_username:awN!l#W*g$P%t-l^.q&d@hostname.test.com:7777/test_database" |
|
|
|
|
|
|
|
|
|
|
|
result = ConfigHelper.get_db_config(%{url: database_url, env_func: fn _ -> nil end}) |
|
|
|
result = ConfigHelper.get_db_config(%{url: database_url, env_func: fn _ -> nil end}) |
|
|
|
|
|
|
|
|
|
|
|
assert result[:username] == "test_username" |
|
|
|
assert result[:username] == "test_username" |
|
|
|
assert result[:password] == "awN!l#W*g$P%t-l^q&d" |
|
|
|
assert result[:password] == "awN!l#W*g$P%t-l^.q&d" |
|
|
|
assert result[:hostname] == "hostname.test.com" |
|
|
|
assert result[:hostname] == "hostname.test.com" |
|
|
|
assert result[:port] == "7777" |
|
|
|
assert result[:port] == "7777" |
|
|
|
assert result[:database] == "test_database" |
|
|
|
assert result[:database] == "test_database" |
|
|
|