Added config file for db #9
@@ -64,7 +64,8 @@ async fn test_db_health_check() {
|
||||
.await
|
||||
.unwrap();
|
||||
let _host_ip = container.get_host().await.unwrap();
|
||||
let host_port = container.get_host_port_ipv4(5432).await.unwrap();
|
||||
let port = 5432;
|
||||
let host_port = container.get_host_port_ipv4(port).await.unwrap();
|
||||
let conn_string = &format!(
|
||||
"postgres://postgres:postgres@localhost:{}/postgres",
|
||||
host_port
|
||||
@@ -72,5 +73,13 @@ async fn test_db_health_check() {
|
||||
|
||||
println!("Test Database: {}", conn_string);
|
||||
|
||||
let _test_pool = PgPoolOptions::new().connect(conn_string).await.unwrap();
|
||||
let _test_pool =
|
||||
match PgPoolOptions::new().connect(conn_string).await {
|
||||
Ok(_) => {
|
||||
assert!(true, "Success");
|
||||
}
|
||||
Err(err) => {
|
||||
assert!(false, "Error: {:?}", err.to_string());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user