From b6f28d7dd23195763e9e3e33f1a9c890a5b68b14 Mon Sep 17 00:00:00 2001 From: Luis Bosque Date: Wed, 3 Oct 2012 16:56:35 +0200 Subject: [PATCH 1/4] version 1.0.0 in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea9c2446..68821fb3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "windshaft-cartodb", - "version": "0.2.0-dev", + "version": "1.0.0", "description": "A map tile server for CartoDB", "url": "https://github.com/Vizzuality/Windshaft-cartodb", "licenses": [{ From 34df118160152f4058d3fa30e8c262a346cb997d Mon Sep 17 00:00:00 2001 From: Luis Bosque Date: Thu, 4 Oct 2012 10:59:40 +0200 Subject: [PATCH 2/4] fixed problem in cluster2 with pidfile name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68821fb3..c84b8610 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "email": "simon@vizzuality.com" }, "dependencies": { - "cluster2": "~0.3.1", + "cluster2": "git://github.com/CartoDB/cluster2.git#28cde11", "node-varnish": "0.1.1", "underscore" : "1.1.x", "grainstore" : "~0.6.2", From 556aaf3330422e0c466c8ef206365df5a6bf601b Mon Sep 17 00:00:00 2001 From: David Arango Date: Thu, 13 Dec 2012 11:43:11 +0100 Subject: [PATCH 3/4] Bump to 1.1.5 --- NEWS.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 25d49b4c..802546e0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +1.1.5 (DD//MM//YY) +----- + 1.1.4 (DD//MM//YY) ----- * Reduce default extent to allow for consistent proj4 round-tripping diff --git a/package.json b/package.json index a94bc376..3a7064f7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "windshaft-cartodb", - "version": "1.1.4", + "version": "1.1.5", "description": "A map tile server for CartoDB", "url": "https://github.com/Vizzuality/Windshaft-cartodb", "licenses": [{ From a69afe4cd7c9318b049d0578e95c46a9f3172f2b Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 19 Dec 2012 08:39:19 +0100 Subject: [PATCH 4/4] Enhance run_tests.sh to allow running single tests and skipping preparation --- Makefile | 6 ++++- NEWS.md | 1 + run_tests.sh | 67 +++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 8048c6c1..424a3c91 100644 --- a/Makefile +++ b/Makefile @@ -8,4 +8,8 @@ config/environments/test.js: config/environments/test.js.example ./configure check: config/environments/test.js - ./run_tests.sh + ./run_tests.sh ${RUNTESTFLAGS} \ + test/unit/cartodb/redis_pool.test.js \ + test/unit/cartodb/req2params.test.js \ + test/acceptance/cache_validator.js \ + test/acceptance/server.js diff --git a/NEWS.md b/NEWS.md index 802546e0..020ca2f2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ 1.1.5 (DD//MM//YY) ----- +* Enhance run_tests.sh to allow running single tests and skipping preparation 1.1.4 (DD//MM//YY) ----- diff --git a/run_tests.sh b/run_tests.sh index 754bfdf3..394f5ad5 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,11 +1,28 @@ #!/bin/sh -# Must match config.redis_pool.port in test/support/config.js +# Must match redis_port in config/environments/test.js +# TODO: read from there REDIS_PORT=6333 +OPT_CREATE=yes # create the test environment +OPT_DROP=yes # drop the test environment + +cd $(dirname $0) +BASEDIR=$(pwd) +cd - + cleanup() { - echo "Cleaning up" - kill ${PID_REDIS} + if test x"$OPT_DROP" = xyes; then + if test x"$PID_REDIS" = x; then + PID_REDIS=$(cat ${BASEDIR}/redis.pid) + if test x"$PID_REDIS" = x; then + echo "Could not find a test redis pid to kill it" + return; + fi + fi + echo "Cleaning up" + kill ${PID_REDIS} + fi } cleanup_and_exit() { @@ -22,21 +39,43 @@ die() { trap 'cleanup_and_exit' 1 2 3 5 9 13 -echo "Starting redis on port ${REDIS_PORT}" -echo "port ${REDIS_PORT}" | redis-server - > test.log & -PID_REDIS=$! +while [ -n "$1" ]; do + if test "$1" = "--nodrop"; then + OPT_DROP=no + shift + continue + elif test "$1" = "--nocreate"; then + OPT_CREATE=no + shift + continue + else + break + fi +done -echo "Preparing the database" -cd test/support; sh prepare_db.sh >> test.log || die "database preparation failure (see test.log)"; cd -; +if [ -z "$1" ]; then + echo "Usage: $0 [] []" >&2 + echo "Options:" >&2 + echo " --nocreate do not create the test environment on start" >&2 + echo " --nodrop do not drop the test environment on exit" >&2 + exit 1 +fi + +TESTS=$@ + +if test x"$OPT_CREATE" = xyes; then + echo "Starting redis on port ${REDIS_PORT}" + echo "port ${REDIS_PORT}" | redis-server - > ${BASEDIR}/test.log & + PID_REDIS=$! + echo ${PID_REDIS} > ${BASEDIR}/redis.pid + + echo "Preparing the environment" + cd ${BASEDIR}/test/support; sh prepare_db.sh || die "database preparation failure"; cd - +fi PATH=node_modules/.bin/:$PATH echo "Running tests" -mocha -u tdd \ - test/unit/cartodb/redis_pool.test.js \ - test/unit/cartodb/req2params.test.js \ - test/acceptance/cache_validator.js \ - test/acceptance/server.js - +mocha -u tdd ${TESTS} cleanup