diff --git a/config/database.ci.yml b/config/database.ci.yml new file mode 100644 index 0000000000..96775f95fb --- /dev/null +++ b/config/database.ci.yml @@ -0,0 +1,31 @@ +# TODO: not sure why this is required by some step in run_tests.sh +# We should research it and remove this to avoid confussion +development: + adapter: postgresql + encoding: unicode + host: localhost + port: 5432 + direct_port: 5432 + database: carto_db_development + username: postgres + password: + conn_validator_timeout: 900 + connect_timeout: 3 + pool: 50 + prepared_statements: false + +test: + adapter: postgresql + encoding: unicode + database: cartodb_test<%= ENV['TEST_ENV_NUMBER'] %> + host: localhost + port: 5432 + direct_port: 5432 + username: postgres + password: + conn_validator_timeout: -1 + connect_timeout: -1 + pool: 100 + prepared_statements: false + variables: + statement_timeout: 10000 diff --git a/config/database.yml.sample b/config/database.yml.sample index dae33ae1e5..c7cb778541 100644 --- a/config/database.yml.sample +++ b/config/database.yml.sample @@ -41,7 +41,7 @@ development: test: adapter: postgresql encoding: unicode - database: cartodb_test<%= ENV['TEST_ENV_NUMBER'] %> + database: carto_db_test host: localhost port: 5432 direct_port: 5432 diff --git a/script/ci/run_tests.sh b/script/ci/run_tests.sh index f64a23b2a5..6078bf74e3 100755 --- a/script/ci/run_tests.sh +++ b/script/ci/run_tests.sh @@ -38,7 +38,7 @@ cd /cartodb ## Setup configuration files cp config/app_config.yml.sample config/app_config.yml -cp config/database.yml.sample config/database.yml +cp config/database.ci.yml config/database.yml if [ -v DEBUG ] && [ $DEBUG = 'true' ]; then echo 'Final configuration for running the CI' cat config/app_config.yml