mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 08:34:13 +02:00
parent
59006e9e8e
commit
39e4ae9a2b
4 changed files with 46 additions and 3 deletions
|
|
@ -177,6 +177,31 @@ fn test_parse_postgres_socket() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_postgres_socket_no_pass() {
|
||||
let config = config_from_file("tests/configs/postgres_socket_no_pass.php");
|
||||
assert_debug_equal(
|
||||
&Database::Postgres {
|
||||
database: "nextcloud".to_string(),
|
||||
username: "redacted".to_string(),
|
||||
password: "".to_string(),
|
||||
connect: DbConnect::Socket("/var/run/postgresql".into()),
|
||||
ssl_options: SslOptions::Default,
|
||||
},
|
||||
&config.database,
|
||||
);
|
||||
#[cfg(feature = "db-sqlx")]
|
||||
assert_debug_equal(
|
||||
AnyConnectOptions::from(
|
||||
PgConnectOptions::new()
|
||||
.socket("/var/run/postgresql")
|
||||
.username("redacted")
|
||||
.database("nextcloud"),
|
||||
),
|
||||
config.database.into(),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_postgres_socket_folder() {
|
||||
let config = config_from_file("tests/configs/postgres_socket_folder.php");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue