From f44a90fe88de2330ffbe6a971768bdc95b5cce4e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 17 Nov 2016 18:58:34 +0100 Subject: [PATCH] Add tools/test-setup.sh script to setup test environment Add simple script to setup the test environment as needed by unit-tests. This script can be used by users to setup their test environment. It will be run by OpenStack CI systems as specific setup before running unit tests. Change-Id: I56d8c5f21e5dc62e1bace93f79d8d017d6df07e7 --- tools/test-setup.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tools/test-setup.sh diff --git a/tools/test-setup.sh b/tools/test-setup.sh new file mode 100755 index 00000000..8d5698e3 --- /dev/null +++ b/tools/test-setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash -xe + +# This script will be run by OpenStack CI before unit tests are run, +# it sets up the test system as needed. +# Developer should setup their test systems in a similar way. + +# This setup needs to be run by a user that can run sudo. + +sudo apt-get update +sudo apt-get install -y default-jre +wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.2/elasticsearch-2.3.2.deb +sudo dpkg -i elasticsearch-2.3.2.deb +# Make 'elasticsearch' binary callable from within functional tests +sudo ln -s /usr/share/elasticsearch/bin/elasticsearch /usr/local/bin/elasticsearch