diff options
author | Randall Leeds <randall@apache.org> | 2012-01-07 14:21:29 -0800 |
---|---|---|
committer | Randall Leeds <randall@apache.org> | 2012-01-26 17:03:10 -0800 |
commit | d20e792617db738dd5ad0e046ae847cd740f586f (patch) | |
tree | b0f6b97c0911b7c0da161a683ab22256ff16441c /test/javascript/run.tpl | |
parent | 257eb522c753ae39a5333938ec1856acd8451ec2 (diff) | |
download | couchdb-d20e792617db738dd5ad0e046ae847cd740f586f.tar.gz |
COUCHDB-1338 - run js tests with port=0
When the JS tests POST to /_restart, the server comes back up on a
different port. To work around this, add a getter property for the
CouchHTTP.prototype.base_url property, using a reserved slot on the
object to store the value.
Diffstat (limited to 'test/javascript/run.tpl')
-rw-r--r-- | test/javascript/run.tpl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/javascript/run.tpl b/test/javascript/run.tpl index 47d2f6e64..ac78b5005 100644 --- a/test/javascript/run.tpl +++ b/test/javascript/run.tpl @@ -17,6 +17,7 @@ SCRIPT_DIR=$SRC_DIR/share/www/script JS_TEST_DIR=$SRC_DIR/test/javascript COUCHJS=%abs_top_builddir%/src/couchdb/priv/couchjs +COUCH_URI_FILE=%localstaterundir%/couch.uri if [ "$#" -eq 0 ]; then @@ -48,11 +49,15 @@ abort() { if [ -z $COUCHDB_NO_START ]; then make dev trap 'abort' 0 1 2 3 4 6 8 15 - ./utils/run -b -r 1 + ./utils/run -b -r 1 -n \ + -a $SRC_DIR/etc/couchdb/default_dev.ini \ + -a $SRC_DIR/test/random_port.ini \ + -a $SRC_DIR/etc/couchdb/local_dev.ini sleep 1 # give it a sec fi -$COUCHJS -H \ +# start the tests +$COUCHJS -H -u $COUCH_URI_FILE \ $SCRIPT_DIR/json2.js \ $SCRIPT_DIR/sha1.js \ $SCRIPT_DIR/oauth.js \ |