Skip to content

Commit

Permalink
Add a script to start the mock server
Browse files Browse the repository at this point in the history
Change-Id: I458fae3123c61b22c6270cae1f5a7ad2acce96ba
Reviewed-on: http://review.couchbase.org/24216
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information
trondn committed Apr 17, 2013
1 parent 6ba3929 commit d8cefc9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -21,3 +21,4 @@
/build/
/tests/config.json
/node_modules/
/tests/CouchbaseMock.jar
32 changes: 32 additions & 0 deletions tests/start_mock.sh
@@ -0,0 +1,32 @@
#! /bin/sh
#
# Copyright 2013 Couchbase, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

if ! [ -f tests/CouchbaseMock.jar ]
then
echo "Downloading Couchbase Mock Server"
curl -s -L -o tests/CouchbaseMock.jar http://files.couchbase.com/maven2/org/couchbase/mock/CouchbaseMock/0.5-SNAPSHOT/CouchbaseMock-0.5-20120726.220757-19.jar
echo "Done"
fi

echo "Starting the mock server"
exec java \
-client \
-jar tests/CouchbaseMock.jar \
--nodes=10 \
--host=localhost \
--port=9000 \
"$@"

0 comments on commit d8cefc9

Please sign in to comment.