mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 16:44:09 +02:00
test for single node cluster
This commit is contained in:
parent
b270299d79
commit
d62e94fd1c
2 changed files with 32 additions and 1 deletions
|
|
@ -340,7 +340,7 @@ fn test_parse_postgres_socket_folder() {
|
|||
fn test_parse_redis_cluster() {
|
||||
let config = config_from_file("tests/configs/redis.cluster.php");
|
||||
let mut addresses = config.redis.addr().cloned().collect::<Vec<_>>();
|
||||
addresses.sort_by(|a, b| format!("{:?}", a).cmp(&format!("{:?}", b)));
|
||||
addresses.sort();
|
||||
assert_debug_equal(
|
||||
vec![
|
||||
parse_redis("redis://:xxx@db1:6380").addr,
|
||||
|
|
@ -354,6 +354,14 @@ fn test_parse_redis_cluster() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_redis_cluster_single() {
|
||||
let config = config_from_file("tests/configs/redis_cluster_single.php");
|
||||
assert!(matches!(config.redis, RedisConfig::Cluster(_)));
|
||||
let addresses = config.redis.addr().cloned().collect::<Vec<_>>();
|
||||
assert_debug_equal(vec![parse_redis("redis://:xxx@db1:6380").addr], addresses);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_config_multiple() {
|
||||
let config = parse_glob("tests/configs/multiple/config.php").unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue