aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 22:00:26 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 22:14:22 +0200
commit86732aa01cf0ad0fb5279f38ce75a9bedbbb66e1 (patch)
treeb0e35a7c53bc865bd2b437b1e8017003b1412363
parent443cff98405adfa7f27b5181f4aaa29bd7d050dc (diff)
downloadwallabag-86732aa01cf0ad0fb5279f38ce75a9bedbbb66e1.tar.gz
wallabag-86732aa01cf0ad0fb5279f38ce75a9bedbbb66e1.tar.zst
wallabag-86732aa01cf0ad0fb5279f38ce75a9bedbbb66e1.zip
Move test parameters out of parameters.yml
The end user doesn't care to about the test database.
-rw-r--r--app/config/config_test.yml1
-rw-r--r--app/config/parameters.yml.dist8
-rw-r--r--app/config/parameters_test.yml8
-rw-r--r--app/config/tests/parameters.yml.dist.mysql37
-rw-r--r--app/config/tests/parameters.yml.dist.pgsql37
-rw-r--r--app/config/tests/parameters.yml.dist.sqlite37
-rw-r--r--app/config/tests/parameters_test.mysql.yml8
-rw-r--r--app/config/tests/parameters_test.pgsql.yml8
-rw-r--r--app/config/tests/parameters_test.sqlite.yml8
-rw-r--r--build.xml12
10 files changed, 39 insertions, 125 deletions
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index d43d872a..3eab6fb2 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -1,5 +1,6 @@
1imports: 1imports:
2 - { resource: config_dev.yml } 2 - { resource: config_dev.yml }
3 - { resource: parameters_test.yml }
3 4
4framework: 5framework:
5 test: ~ 6 test: ~
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 7c7413fb..d45839f4 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -19,14 +19,6 @@ parameters:
19 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" 19 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
20 database_table_prefix: wallabag_ 20 database_table_prefix: wallabag_
21 21
22 test_database_driver: pdo_sqlite
23 test_database_host: 127.0.0.1
24 test_database_port: ~
25 test_database_name: ~
26 test_database_user: ~
27 test_database_password: ~
28 test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
29
30 mailer_transport: smtp 22 mailer_transport: smtp
31 mailer_host: 127.0.0.1 23 mailer_host: 127.0.0.1
32 mailer_user: ~ 24 mailer_user: ~
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
new file mode 100644
index 00000000..696c95ef
--- /dev/null
+++ b/app/config/parameters_test.yml
@@ -0,0 +1,8 @@
1parameters:
2 test_database_driver: pdo_sqlite
3 test_database_host: 127.0.0.1
4 test_database_port: null
5 test_database_name: null
6 test_database_user: null
7 test_database_password: null
8 test_database_path: '%kernel.root_dir%/../data/db/wallabag_testYO.sqlite'
diff --git a/app/config/tests/parameters.yml.dist.mysql b/app/config/tests/parameters.yml.dist.mysql
deleted file mode 100644
index 1951f021..00000000
--- a/app/config/tests/parameters.yml.dist.mysql
+++ /dev/null
@@ -1,37 +0,0 @@
1# This file is a "template" of what your parameters.yml file should look like
2parameters:
3 database_driver: pdo_sqlite
4 database_host: 127.0.0.1
5 database_port: ~
6 database_name: symfony
7 database_user: root
8 database_password: ~
9 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
10 database_table_prefix: wallabag_
11
12 test_database_driver: pdo_mysql
13 test_database_host: localhost
14 test_database_port: 3306
15 test_database_name: wallabag_test
16 test_database_user: root
17 test_database_password: ~
18 test_database_path: ~
19
20 mailer_transport: smtp
21 mailer_host: 127.0.0.1
22 mailer_user: ~
23 mailer_password: ~
24
25 locale: en
26
27 # A secret key that's used to generate certain security-related tokens
28 secret: ThisTokenIsNotSoSecretChangeIt
29
30 # two factor stuff
31 twofactor_auth: true
32 twofactor_sender: no-reply@wallabag.org
33
34 # fosuser stuff
35 fosuser_confirmation: true
36
37 from_email: no-reply@wallabag.org
diff --git a/app/config/tests/parameters.yml.dist.pgsql b/app/config/tests/parameters.yml.dist.pgsql
deleted file mode 100644
index 36ad6cde..00000000
--- a/app/config/tests/parameters.yml.dist.pgsql
+++ /dev/null
@@ -1,37 +0,0 @@
1# This file is a "template" of what your parameters.yml file should look like
2parameters:
3 database_driver: pdo_sqlite
4 database_host: 127.0.0.1
5 database_port: ~
6 database_name: symfony
7 database_user: root
8 database_password: ~
9 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
10 database_table_prefix: wallabag_
11
12 test_database_driver: pdo_pgsql
13 test_database_host: localhost
14 test_database_port:
15 test_database_name: wallabag_test
16 test_database_user: travis
17 test_database_password: ~
18 test_database_path: ~
19
20 mailer_transport: smtp
21 mailer_host: 127.0.0.1
22 mailer_user: ~
23 mailer_password: ~
24
25 locale: en
26
27 # A secret key that's used to generate certain security-related tokens
28 secret: ThisTokenIsNotSoSecretChangeIt
29
30 # two factor stuff
31 twofactor_auth: true
32 twofactor_sender: no-reply@wallabag.org
33
34 # fosuser stuff
35 fosuser_confirmation: true
36
37 from_email: no-reply@wallabag.org
diff --git a/app/config/tests/parameters.yml.dist.sqlite b/app/config/tests/parameters.yml.dist.sqlite
deleted file mode 100644
index 6564014a..00000000
--- a/app/config/tests/parameters.yml.dist.sqlite
+++ /dev/null
@@ -1,37 +0,0 @@
1# This file is a "template" of what your parameters.yml file should look like
2parameters:
3 database_driver: pdo_sqlite
4 database_host: 127.0.0.1
5 database_port: ~
6 database_name: symfony
7 database_user: root
8 database_password: ~
9 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
10 database_table_prefix: wallabag_
11
12 test_database_driver: pdo_sqlite
13 test_database_host: localhost
14 test_database_port:
15 test_database_name: ~
16 test_database_user: ~
17 test_database_password: ~
18 test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
19
20 mailer_transport: smtp
21 mailer_host: 127.0.0.1
22 mailer_user: ~
23 mailer_password: ~
24
25 locale: en
26
27 # A secret key that's used to generate certain security-related tokens
28 secret: ThisTokenIsNotSoSecretChangeIt
29
30 # two factor stuff
31 twofactor_auth: true
32 twofactor_sender: no-reply@wallabag.org
33
34 # fosuser stuff
35 fosuser_confirmation: true
36
37 from_email: no-reply@wallabag.org
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml
new file mode 100644
index 00000000..d8512845
--- /dev/null
+++ b/app/config/tests/parameters_test.mysql.yml
@@ -0,0 +1,8 @@
1parameters:
2 test_database_driver: pdo_mysql
3 test_database_host: localhost
4 test_database_port: 3306
5 test_database_name: wallabag_test
6 test_database_user: root
7 test_database_password: ~
8 test_database_path: ~
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml
new file mode 100644
index 00000000..41383868
--- /dev/null
+++ b/app/config/tests/parameters_test.pgsql.yml
@@ -0,0 +1,8 @@
1parameters:
2 test_database_driver: pdo_pgsql
3 test_database_host: localhost
4 test_database_port:
5 test_database_name: wallabag_test
6 test_database_user: travis
7 test_database_password: ~
8 test_database_path: ~
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml
new file mode 100644
index 00000000..6e9f98de
--- /dev/null
+++ b/app/config/tests/parameters_test.sqlite.yml
@@ -0,0 +1,8 @@
1parameters:
2 test_database_driver: pdo_sqlite
3 test_database_host: localhost
4 test_database_port:
5 test_database_name: ~
6 test_database_user: ~
7 test_database_password: ~
8 test_database_path: "%kernel.root_dir%/../data/db/wallabag_testHU.sqlite"
diff --git a/build.xml b/build.xml
index 2ccf4944..37b40743 100644
--- a/build.xml
+++ b/build.xml
@@ -42,8 +42,8 @@
42 <target name="db_mysql" description="Run test for MySQL"> 42 <target name="db_mysql" description="Run test for MySQL">
43 <delete dir="${basedir}/app/config/parameters.yml"/> 43 <delete dir="${basedir}/app/config/parameters.yml"/>
44 <exec executable="cp"> 44 <exec executable="cp">
45 <arg value="${basedir}/app/config/tests/parameters.yml.dist.mysql"/> 45 <arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
46 <arg value="${basedir}/app/config/parameters.yml"/> 46 <arg value="${basedir}/app/config/parameters_test.yml"/>
47 </exec> 47 </exec>
48 48
49 <exec executable="php"> 49 <exec executable="php">
@@ -56,8 +56,8 @@
56 <target name="db_sqlite" description="Run test for SQLite"> 56 <target name="db_sqlite" description="Run test for SQLite">
57 <delete dir="${basedir}/app/config/parameters.yml"/> 57 <delete dir="${basedir}/app/config/parameters.yml"/>
58 <exec executable="cp"> 58 <exec executable="cp">
59 <arg value="${basedir}/app/config/tests/parameters.yml.dist.sqlite"/> 59 <arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
60 <arg value="${basedir}/app/config/parameters.yml"/> 60 <arg value="${basedir}/app/config/parameters_test.yml"/>
61 </exec> 61 </exec>
62 62
63 <exec executable="php"> 63 <exec executable="php">
@@ -70,8 +70,8 @@
70 <target name="db_pgsql" description="Run test for PostgreSQL"> 70 <target name="db_pgsql" description="Run test for PostgreSQL">
71 <delete dir="${basedir}/app/config/parameters.yml"/> 71 <delete dir="${basedir}/app/config/parameters.yml"/>
72 <exec executable="cp"> 72 <exec executable="cp">
73 <arg value="${basedir}/app/config/tests/parameters.yml.dist.pgsql"/> 73 <arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
74 <arg value="${basedir}/app/config/parameters.yml"/> 74 <arg value="${basedir}/app/config/parameters_test.yml"/>
75 </exec> 75 </exec>
76 76
77 <exec executable="php"> 77 <exec executable="php">