mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 08:34:13 +02:00
import from notify_push
This commit is contained in:
commit
28e84abd56
17 changed files with 792 additions and 0 deletions
15
tests/configs/basic.php
Normal file
15
tests/configs/basic.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => '127.0.0.1',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
20
tests/configs/comment_whitespace.php
Normal file
20
tests/configs/comment_whitespace.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
// some comment
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql', // comment inside the config
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => '127.0.0.1',
|
||||
/**
|
||||
* block comment
|
||||
*/
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
15
tests/configs/empty_redis_password.php
Normal file
15
tests/configs/empty_redis_password.php
Normal 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',
|
||||
'password' => ''
|
||||
]
|
||||
];
|
||||
17
tests/configs/full_redis.php
Normal file
17
tests/configs/full_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' => 'redis',
|
||||
'dbindex' => 1,
|
||||
'port' => 1234,
|
||||
'password' => 'moresecret'
|
||||
]
|
||||
];
|
||||
14
tests/configs/implicit_prefix.php
Normal file
14
tests/configs/implicit_prefix.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'localhost',
|
||||
'dbport' => '',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
9
tests/configs/multiple/config.php
Normal file
9
tests/configs/multiple/config.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
],
|
||||
'dbtype' => 'sqlite',
|
||||
];
|
||||
11
tests/configs/multiple/db.config.php
Normal file
11
tests/configs/multiple/db.config.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => '127.0.0.1',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret'
|
||||
];
|
||||
15
tests/configs/mysql_fqdn.php
Normal file
15
tests/configs/mysql_fqdn.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'db.example.com',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
15
tests/configs/port_in_host.php
Normal file
15
tests/configs/port_in_host.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => '127.0.0.1:1234',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
15
tests/configs/postgres_socket.php
Normal file
15
tests/configs/postgres_socket.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'pgsql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'localhost:/var/run/postgresql/.s.PGSQL.5432',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'redacted',
|
||||
'dbpassword' => 'redacted',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
15
tests/configs/postgres_socket_folder.php
Normal file
15
tests/configs/postgres_socket_folder.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'pgsql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'localhost:/var/run/postgresql',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'redacted',
|
||||
'dbpassword' => 'redacted',
|
||||
'redis' => [
|
||||
'host' => 'localhost'
|
||||
]
|
||||
];
|
||||
28
tests/configs/redis.cluster.php
Normal file
28
tests/configs/redis.cluster.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => '127.0.0.1',
|
||||
'dbport' => '',
|
||||
'dbtableprefix' => 'oc_',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis.cluster' =>
|
||||
array (
|
||||
'seeds' =>
|
||||
array (
|
||||
0 => 'db1:6380',
|
||||
1 => 'db1:6381',
|
||||
2 => 'db1:6382',
|
||||
3 => 'db2:6380',
|
||||
4 => 'db2:6381',
|
||||
5 => 'db2:6382',
|
||||
),
|
||||
'password' => 'xxx',
|
||||
'timeout' => 0.0,
|
||||
'read_timeout' => 0.0,
|
||||
'failover_mode' => \RedisCluster::FAILOVER_ERROR
|
||||
),
|
||||
];
|
||||
14
tests/configs/redis_socket.php
Normal file
14
tests/configs/redis_socket.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
$CONFIG = [
|
||||
'overwrite.cli.url' => 'https://cloud.example.com',
|
||||
'dbtype' => 'mysql',
|
||||
'dbname' => 'nextcloud',
|
||||
'dbhost' => 'localhost',
|
||||
'dbport' => '',
|
||||
'dbuser' => 'nextcloud',
|
||||
'dbpassword' => 'secret',
|
||||
'redis' => [
|
||||
'host' => '/redis',
|
||||
]
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue