|
|
@@ -18,12 +18,12 @@
|
|
|
-compile(nowarn_export_all).
|
|
|
-compile(export_all).
|
|
|
|
|
|
+-include("emqx_connector.hrl").
|
|
|
-include_lib("eunit/include/eunit.hrl").
|
|
|
-include_lib("emqx/include/emqx.hrl").
|
|
|
-include_lib("stdlib/include/assert.hrl").
|
|
|
|
|
|
-define(PGSQL_HOST, "pgsql").
|
|
|
--define(PGSQL_PORT, 5432).
|
|
|
|
|
|
all() ->
|
|
|
emqx_common_test_helpers:all(?MODULE).
|
|
|
@@ -32,7 +32,7 @@ groups() ->
|
|
|
[].
|
|
|
|
|
|
init_per_suite(Config) ->
|
|
|
- case emqx_common_test_helpers:is_tcp_server_available(?PGSQL_HOST, ?PGSQL_PORT) of
|
|
|
+ case emqx_common_test_helpers:is_tcp_server_available(?PGSQL_HOST, ?PGSQL_DEFAULT_PORT) of
|
|
|
true ->
|
|
|
Config;
|
|
|
false ->
|
|
|
@@ -124,7 +124,7 @@ pgsql_config() ->
|
|
|
username => <<"root">>,
|
|
|
password => <<"public">>,
|
|
|
pool_size => 8,
|
|
|
- server => {?PGSQL_HOST, ?PGSQL_PORT},
|
|
|
+ server => {?PGSQL_HOST, ?PGSQL_DEFAULT_PORT},
|
|
|
ssl => #{enable => false}
|
|
|
}.
|
|
|
|
|
|
@@ -135,7 +135,7 @@ pgsql_bad_config() ->
|
|
|
username => <<"bad_root">>,
|
|
|
password => <<"bad_public">>,
|
|
|
pool_size => 8,
|
|
|
- server => {?PGSQL_HOST, ?PGSQL_PORT},
|
|
|
+ server => {?PGSQL_HOST, ?PGSQL_DEFAULT_PORT},
|
|
|
ssl => #{enable => false}
|
|
|
}.
|
|
|
|