]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Move test parameters out of parameters.yml 1916/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 12 Apr 2016 20:00:26 +0000 (22:00 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 12 Apr 2016 20:14:22 +0000 (22:14 +0200)
The end user doesn't care to about the test database.

app/config/config_test.yml
app/config/parameters.yml.dist
app/config/parameters_test.yml [new file with mode: 0644]
app/config/tests/parameters.yml.dist.mysql [deleted file]
app/config/tests/parameters.yml.dist.pgsql [deleted file]
app/config/tests/parameters.yml.dist.sqlite [deleted file]
app/config/tests/parameters_test.mysql.yml [new file with mode: 0644]
app/config/tests/parameters_test.pgsql.yml [new file with mode: 0644]
app/config/tests/parameters_test.sqlite.yml [new file with mode: 0644]
build.xml

index d43d872aba7cc3a29f33eb99599d799de86b87d9..3eab6fb2848f5afccf9c8b6b76ded8a8b845aa93 100644 (file)
@@ -1,5 +1,6 @@
 imports:
     - { resource: config_dev.yml }
+    - { resource: parameters_test.yml }
 
 framework:
     test: ~
index 7c7413fb9b276c5c4338724c41d90c25f53a7679..d45839f4dacedf3386d332ef3a515d4497b740e3 100644 (file)
@@ -19,14 +19,6 @@ parameters:
     database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
     database_table_prefix: wallabag_
 
-    test_database_driver: pdo_sqlite
-    test_database_host: 127.0.0.1
-    test_database_port: ~
-    test_database_name: ~
-    test_database_user: ~
-    test_database_password: ~
-    test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
-
     mailer_transport:  smtp
     mailer_host:       127.0.0.1
     mailer_user:       ~
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
new file mode 100644 (file)
index 0000000..696c95e
--- /dev/null
@@ -0,0 +1,8 @@
+parameters:
+    test_database_driver: pdo_sqlite
+    test_database_host: 127.0.0.1
+    test_database_port: null
+    test_database_name: null
+    test_database_user: null
+    test_database_password: null
+    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 (file)
index 1951f02..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is a "template" of what your parameters.yml file should look like
-parameters:
-    database_driver: pdo_sqlite
-    database_host: 127.0.0.1
-    database_port: ~
-    database_name: symfony
-    database_user: root
-    database_password: ~
-    database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
-    database_table_prefix: wallabag_
-
-    test_database_driver: pdo_mysql
-    test_database_host: localhost
-    test_database_port: 3306
-    test_database_name: wallabag_test
-    test_database_user: root
-    test_database_password: ~
-    test_database_path: ~
-
-    mailer_transport:  smtp
-    mailer_host:       127.0.0.1
-    mailer_user:       ~
-    mailer_password:   ~
-
-    locale:            en
-
-    # A secret key that's used to generate certain security-related tokens
-    secret:            ThisTokenIsNotSoSecretChangeIt
-
-    # two factor stuff
-    twofactor_auth: true
-    twofactor_sender: no-reply@wallabag.org
-
-    # fosuser stuff
-    fosuser_confirmation: true
-
-    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 (file)
index 36ad6cd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is a "template" of what your parameters.yml file should look like
-parameters:
-    database_driver: pdo_sqlite
-    database_host: 127.0.0.1
-    database_port: ~
-    database_name: symfony
-    database_user: root
-    database_password: ~
-    database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
-    database_table_prefix: wallabag_
-
-    test_database_driver: pdo_pgsql
-    test_database_host: localhost
-    test_database_port:
-    test_database_name: wallabag_test
-    test_database_user: travis
-    test_database_password: ~
-    test_database_path: ~
-
-    mailer_transport:  smtp
-    mailer_host:       127.0.0.1
-    mailer_user:       ~
-    mailer_password:   ~
-
-    locale:            en
-
-    # A secret key that's used to generate certain security-related tokens
-    secret:            ThisTokenIsNotSoSecretChangeIt
-
-    # two factor stuff
-    twofactor_auth: true
-    twofactor_sender: no-reply@wallabag.org
-
-    # fosuser stuff
-    fosuser_confirmation: true
-
-    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 (file)
index 6564014..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is a "template" of what your parameters.yml file should look like
-parameters:
-    database_driver: pdo_sqlite
-    database_host: 127.0.0.1
-    database_port: ~
-    database_name: symfony
-    database_user: root
-    database_password: ~
-    database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
-    database_table_prefix: wallabag_
-
-    test_database_driver: pdo_sqlite
-    test_database_host: localhost
-    test_database_port:
-    test_database_name: ~
-    test_database_user: ~
-    test_database_password: ~
-    test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
-
-    mailer_transport:  smtp
-    mailer_host:       127.0.0.1
-    mailer_user:       ~
-    mailer_password:   ~
-
-    locale:            en
-
-    # A secret key that's used to generate certain security-related tokens
-    secret:            ThisTokenIsNotSoSecretChangeIt
-
-    # two factor stuff
-    twofactor_auth: true
-    twofactor_sender: no-reply@wallabag.org
-
-    # fosuser stuff
-    fosuser_confirmation: true
-
-    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 (file)
index 0000000..d851284
--- /dev/null
@@ -0,0 +1,8 @@
+parameters:
+    test_database_driver: pdo_mysql
+    test_database_host: localhost
+    test_database_port: 3306
+    test_database_name: wallabag_test
+    test_database_user: root
+    test_database_password: ~
+    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 (file)
index 0000000..4138386
--- /dev/null
@@ -0,0 +1,8 @@
+parameters:
+    test_database_driver: pdo_pgsql
+    test_database_host: localhost
+    test_database_port:
+    test_database_name: wallabag_test
+    test_database_user: travis
+    test_database_password: ~
+    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 (file)
index 0000000..6e9f98d
--- /dev/null
@@ -0,0 +1,8 @@
+parameters:
+    test_database_driver: pdo_sqlite
+    test_database_host: localhost
+    test_database_port:
+    test_database_name: ~
+    test_database_user: ~
+    test_database_password: ~
+    test_database_path: "%kernel.root_dir%/../data/db/wallabag_testHU.sqlite"
index 2ccf4944842fff5b628076292ed6e45df737ac11..37b40743ae6ac6f42f4f680837d2e0f7c17f6173 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -42,8 +42,8 @@
     <target name="db_mysql" description="Run test for MySQL">
         <delete dir="${basedir}/app/config/parameters.yml"/>
         <exec executable="cp">
-            <arg value="${basedir}/app/config/tests/parameters.yml.dist.mysql"/>
-            <arg value="${basedir}/app/config/parameters.yml"/>
+            <arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
+            <arg value="${basedir}/app/config/parameters_test.yml"/>
         </exec>
 
         <exec executable="php">
@@ -56,8 +56,8 @@
     <target name="db_sqlite" description="Run test for SQLite">
         <delete dir="${basedir}/app/config/parameters.yml"/>
         <exec executable="cp">
-            <arg value="${basedir}/app/config/tests/parameters.yml.dist.sqlite"/>
-            <arg value="${basedir}/app/config/parameters.yml"/>
+            <arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
+            <arg value="${basedir}/app/config/parameters_test.yml"/>
         </exec>
 
         <exec executable="php">
@@ -70,8 +70,8 @@
     <target name="db_pgsql" description="Run test for PostgreSQL">
         <delete dir="${basedir}/app/config/parameters.yml"/>
         <exec executable="cp">
-            <arg value="${basedir}/app/config/tests/parameters.yml.dist.pgsql"/>
-            <arg value="${basedir}/app/config/parameters.yml"/>
+            <arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
+            <arg value="${basedir}/app/config/parameters_test.yml"/>
         </exec>
 
         <exec executable="php">