Permalink
Browse files

Add a script to start the mock server

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...
1 parent 6ba3929 commit d8cefc986e9c10fa92e282ba69a661702402693f @trondn trondn committed Jan 26, 2013
Showing with 33 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +32 −0 tests/start_mock.sh
View
@@ -21,3 +21,4 @@
/build/
/tests/config.json
/node_modules/
+/tests/CouchbaseMock.jar
View
@@ -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.