From 86e8cedfab557fbe7cf994983cf5751f10ccc267 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 31 May 2016 15:17:41 +0200 Subject: [PATCH] All remote sql files together --- test/support/prepare_db.sh | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/test/support/prepare_db.sh b/test/support/prepare_db.sh index ceac7c78..ed93e021 100755 --- a/test/support/prepare_db.sh +++ b/test/support/prepare_db.sh @@ -71,19 +71,7 @@ if test x"$PREPARE_PGSQL" = xyes; then dropdb "${TEST_DB}" createdb -Ttemplate_postgis -EUTF8 "${TEST_DB}" || die "Could not create test database" - curl -L -s https://raw.githubusercontent.com/CartoDB/camshaft/master/test/fixtures/cdb_analysis_catalog.sql -o sql/cdb_analysis_catalog.sql - cat sql/cdb_analysis_catalog.sql | psql -v ON_ERROR_STOP=1 ${TEST_DB} || exit 1 - - cat sql/windshaft.test.sql sql/gadm4.sql | - sed "s/:PUBLICUSER/${PUBLICUSER}/" | - sed "s/:PUBLICPASS/${PUBLICPASS}/" | - sed "s/:TESTUSER/${TESTUSER}/" | - sed "s/:TESTPASS/${TESTPASS}/" | - psql -v ON_ERROR_STOP=1 ${TEST_DB} || exit 1 - - cat sql/_CDB_QueryStatements.sql | psql -v ON_ERROR_STOP=1 ${TEST_DB} || exit 1 - - SQL_SCRIPTS='CDB_QueryTables CDB_CartodbfyTable CDB_TableMetadata CDB_ForeignTable CDB_UserTables CDB_ColumnNames CDB_ZoomFromScale CDB_Overviews CDB_QuantileBins CDB_JenksBins CDB_HeadsTailsBins CDB_EqualIntervalBins CDB_Hexagon CDB_XYZ' + SQL_SCRIPTS='CDB_QueryTables CDB_CartodbfyTable CDB_TableMetadata CDB_ForeignTable CDB_UserTables CDB_ColumnNames CDB_AnalysisCatalog CDB_ZoomFromScale CDB_Overviews CDB_QuantileBins CDB_JenksBins CDB_HeadsTailsBins CDB_EqualIntervalBins CDB_Hexagon CDB_XYZ' for i in ${SQL_SCRIPTS} do curl -L -s https://github.com/CartoDB/cartodb-postgresql/raw/master/scripts-available/$i.sql -o sql/$i.sql @@ -91,6 +79,12 @@ if test x"$PREPARE_PGSQL" = xyes; then | psql -v ON_ERROR_STOP=1 ${TEST_DB} || exit 1 done + cat sql/_CDB_QueryStatements.sql sql/windshaft.test.sql sql/gadm4.sql sql/ported/populated_places_simple_reduced.sql | + sed "s/:PUBLICUSER/${PUBLICUSER}/" | + sed "s/:PUBLICPASS/${PUBLICPASS}/" | + sed "s/:TESTUSER/${TESTUSER}/" | + sed "s/:TESTPASS/${TESTPASS}/" | + psql -v ON_ERROR_STOP=1 ${TEST_DB} || exit 1 fi if test x"$PREPARE_REDIS" = xyes; then @@ -122,17 +116,3 @@ EOF fi echo "Finished preparing data. Ready to run tests" - - -############################ WINDSHAFT TESTS ############################ - -echo "...Configuring Windshaft test database" - -cat sql/ported/populated_places_simple_reduced.sql | - sed "s/:PUBLICUSER/${PUBLICUSER}/" | - sed "s/:PUBLICPASS/${PUBLICPASS}/" | - sed "s/:TESTUSER/${TESTUSER}/" | - sed "s/:TESTPASS/${TESTPASS}/" | - psql -v ON_ERROR_STOP=1 ${TEST_DB} || exit 1 - -echo "...Test database configuration complete"