implement test changes regarding database
also added .env for database connection details (used by sqlx)
This commit is contained in:
@@ -22,4 +22,13 @@ pub fn get_configuration() -> Result<Settings, config::ConfigError> {
|
||||
|
||||
// Try convert into Settings type
|
||||
settings.try_into()
|
||||
}
|
||||
|
||||
impl DatabaseSettings {
|
||||
pub fn connection_string(&self) -> String {
|
||||
format!(
|
||||
"postgres://{}:{}@{}:{}/{}",
|
||||
self.username, self.password, self.host, self.port, self.database_name
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user