File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ pub const DEFAULT_DB_NAME: &str = "ldk_db";
3434/// The default table in which we store all data.
3535pub const DEFAULT_KV_TABLE_NAME : & str = "ldk_data" ;
3636
37+ /// Environment variable used by PostgreSQL tests and benchmarks.
38+ pub const POSTGRES_TEST_URL_ENV_VAR : & str = "TEST_POSTGRES_URL" ;
39+
3740// The current schema version for the PostgreSQL store.
3841const SCHEMA_VERSION : u16 = 1 ;
3942
@@ -807,7 +810,8 @@ mod tests {
807810 use crate :: io:: test_utils:: { do_read_write_remove_list_persist, do_test_store} ;
808811
809812 fn test_connection_string ( ) -> String {
810- std:: env:: var ( "TEST_POSTGRES_URL" )
813+ dotenvy:: dotenv ( ) . ok ( ) ;
814+ std:: env:: var ( POSTGRES_TEST_URL_ENV_VAR )
811815 . unwrap_or_else ( |_| "postgres://postgres:postgres@localhost/ldk_node_tests" . to_string ( ) )
812816 }
813817
Original file line number Diff line number Diff line change 1010mod common;
1111
1212use ldk_node:: entropy:: NodeEntropy ;
13+ use ldk_node:: io:: postgres_store:: POSTGRES_TEST_URL_ENV_VAR ;
1314use ldk_node:: Builder ;
1415use rand:: RngCore ;
1516
1617fn test_connection_string ( ) -> String {
17- std:: env:: var ( "TEST_POSTGRES_URL" )
18+ dotenvy:: dotenv ( ) . ok ( ) ;
19+ std:: env:: var ( POSTGRES_TEST_URL_ENV_VAR )
1820 . unwrap_or_else ( |_| "host=localhost user=postgres password=postgres" . to_string ( ) )
1921}
2022
You can’t perform that action at this time.
0 commit comments