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
This commit is contained in:
Andreas Jaeger 2016-11-17 18:58:34 +01:00 committed by Andreas Jaeger
parent 63544206c1
commit f44a90fe88

14
tools/test-setup.sh Executable file
View File

@ -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