[jhottenstein] Changes to get the integration tests running
* Added documentation * Added REDSTORM_COMMAND environment variable for run_all.sh * Reverted to non EOL ubuntu version
This commit is contained in:
parent
3f711edc96
commit
ceef935178
|
@ -1,3 +1,18 @@
|
|||
# Integration Tests
|
||||
|
||||
These are integration tests to automate the testing of topology submission in a local and remote cluster. More documentation on usage to come.
|
||||
These are integration tests to automate the testing of topology submission in a local and remote cluster. More documentation on usage to come.
|
||||
|
||||
##Prerequisites
|
||||
* Storm cluster available
|
||||
* Run the vagrant machine - https://github.com/colinsurprenant/redstorm/blob/master/vagrant/README.md
|
||||
* Setup a storm cluster - https://storm.incubator.apache.org/documentation/Setting-up-a-Storm-cluster.html
|
||||
* Redis Server listening on localhost:6379
|
||||
* Run the vagrant machine - https://github.com/colinsurprenant/redstorm/blob/master/vagrant/README.md
|
||||
* Install redis locally - http://redis.io/download
|
||||
* Storm client installed locally - http://storm.incubator.apache.org/documentation/Setting-up-development-environment.html
|
||||
* ~/.storm/storm.yaml pointing at your storm cluster - eg. ``nimbus.host: "localhost"``
|
||||
|
||||
##Running tests
|
||||
|
||||
* ``$ test/integration/run_all.sh`` - Uses locally bundled redstorm
|
||||
* ``$ REDSTORM_COMMAND=/usr/bin/redstorm test/integration/run_all.sh`` - Set REDSTORM_COMMAND to use a specific redstorm binary
|
|
@ -1,20 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
TOPOLOGIES=test/topology/*.rb
|
||||
COMMANDS=("redstorm" "bundle exec redstorm" "bin/redstorm" )
|
||||
REDSTORM=""
|
||||
COMMANDS=("bundle exec redstorm" "bin/redstorm" )
|
||||
|
||||
# export PATH="$PATH:./storm/bin"
|
||||
if test -z "${REDSTORM_COMMAND}"
|
||||
then
|
||||
# figure correct command
|
||||
for c in "${COMMANDS[@]}"; do
|
||||
$c version &> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
REDSTORM_COMMAND=$c
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo "Using '${REDSTORM_COMMAND}' as the redstorm command"
|
||||
|
||||
# figure correct command
|
||||
for c in "${COMMANDS[@]}"; do
|
||||
$c version &> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
REDSTORM=$c
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$REDSTORM" == "" ]; then
|
||||
$REDSTORM_COMMAND version &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "redstorm command not found"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -23,12 +26,12 @@ if [[ $@ != "noinstall" ]]; then
|
|||
# install target
|
||||
rm -rf target
|
||||
bundle install
|
||||
$REDSTORM install
|
||||
$REDSTORM bundle topology
|
||||
$REDSTORM jar test
|
||||
$REDSTORM_COMMAND install
|
||||
$REDSTORM_COMMAND bundle topology
|
||||
$REDSTORM_COMMAND jar test
|
||||
fi
|
||||
|
||||
echo "runnig integration tests..."
|
||||
echo "running integration tests..."
|
||||
|
||||
# run local mode tests
|
||||
for t in $TOPOLOGIES; do
|
||||
|
|
|
@ -136,8 +136,8 @@ Vagrant.configure("2") do |config|
|
|||
end
|
||||
|
||||
config.vm.define :dev do |dev|
|
||||
dev.vm.box = "quantal64-amd64"
|
||||
dev.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/quantal/current/quantal-server-cloudimg-amd64-vagrant-disk1.box"
|
||||
dev.vm.box = "precise-amd64"
|
||||
dev.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
|
||||
|
||||
# storm ui
|
||||
dev.vm.network :forwarded_port, :guest => 8080, :host => 8080
|
||||
|
|
Loading…
Reference in New Issue