handle redis db index as str

This commit is contained in:
Robin Appelman 2025-08-11 10:46:04 +02:00
commit 484af6a8e7
5 changed files with 31 additions and 3 deletions

View file

@ -108,6 +108,15 @@ fn test_parse_redis_socket() {
);
}
#[test]
fn test_parse_redis_db_str() {
let config = config_from_file("tests/configs/redis_db_str.php");
assert_debug_equal(
RedisConfig::Single(parse_redis("redis://127.0.0.1/1")),
config.redis,
);
}
#[test]
fn test_parse_notify_push_redis() {
let config = config_from_file("tests/configs/notify_push_redis.php");

View file

@ -0,0 +1,15 @@
<?php
$CONFIG = [
'overwrite.cli.url' => 'https://cloud.example.com',
'dbtype' => 'mysql',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbuser' => 'nextcloud',
'dbpassword' => 'secret',
'redis' => [
'host' => 'localhost',
'dbindex' => '1',
]
];