mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 16:44:09 +02:00
add test for separate notify_push redis
This commit is contained in:
parent
b1060bbb73
commit
9ada18d5a6
2 changed files with 30 additions and 0 deletions
|
|
@ -108,6 +108,19 @@ fn test_parse_redis_socket() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_parse_notify_push_redis() {
|
||||||
|
let config = config_from_file("tests/configs/notify_push_redis.php");
|
||||||
|
assert_debug_equal(
|
||||||
|
RedisConfig::Single(parse_redis("redis+unix:///redis1")),
|
||||||
|
config.redis,
|
||||||
|
);
|
||||||
|
assert_debug_equal(
|
||||||
|
Some(RedisConfig::Single(parse_redis("redis+unix:///redis2"))),
|
||||||
|
config.notify_push_redis,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_redis_tls() {
|
fn test_parse_redis_tls() {
|
||||||
let config = config_from_file("tests/configs/redis_tls.php");
|
let config = config_from_file("tests/configs/redis_tls.php");
|
||||||
|
|
|
||||||
17
tests/configs/notify_push_redis.php
Normal file
17
tests/configs/notify_push_redis.php
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$CONFIG = [
|
||||||
|
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||||
|
'dbtype' => 'mysql',
|
||||||
|
'dbname' => 'nextcloud',
|
||||||
|
'dbhost' => 'localhost',
|
||||||
|
'dbport' => '',
|
||||||
|
'dbuser' => 'nextcloud',
|
||||||
|
'dbpassword' => 'secret',
|
||||||
|
'redis' => [
|
||||||
|
'host' => '/redis1',
|
||||||
|
],
|
||||||
|
'notify_push_redis' => [
|
||||||
|
'host' => '/redis2',
|
||||||
|
]
|
||||||
|
];
|
||||||
Loading…
Add table
Add a link
Reference in a new issue