[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
|
# 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
|
#!/bin/bash
|
||||||
|
|
||||||
TOPOLOGIES=test/topology/*.rb
|
TOPOLOGIES=test/topology/*.rb
|
||||||
COMMANDS=("redstorm" "bundle exec redstorm" "bin/redstorm" )
|
COMMANDS=("bundle exec redstorm" "bin/redstorm" )
|
||||||
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
|
$REDSTORM_COMMAND version &> /dev/null
|
||||||
for c in "${COMMANDS[@]}"; do
|
if [ $? -ne 0 ]; then
|
||||||
$c version &> /dev/null
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
REDSTORM=$c
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ "$REDSTORM" == "" ]; then
|
|
||||||
echo "redstorm command not found"
|
echo "redstorm command not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -23,12 +26,12 @@ if [[ $@ != "noinstall" ]]; then
|
||||||
# install target
|
# install target
|
||||||
rm -rf target
|
rm -rf target
|
||||||
bundle install
|
bundle install
|
||||||
$REDSTORM install
|
$REDSTORM_COMMAND install
|
||||||
$REDSTORM bundle topology
|
$REDSTORM_COMMAND bundle topology
|
||||||
$REDSTORM jar test
|
$REDSTORM_COMMAND jar test
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "runnig integration tests..."
|
echo "running integration tests..."
|
||||||
|
|
||||||
# run local mode tests
|
# run local mode tests
|
||||||
for t in $TOPOLOGIES; do
|
for t in $TOPOLOGIES; do
|
||||||
|
|
|
@ -136,8 +136,8 @@ Vagrant.configure("2") do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :dev do |dev|
|
config.vm.define :dev do |dev|
|
||||||
dev.vm.box = "quantal64-amd64"
|
dev.vm.box = "precise-amd64"
|
||||||
dev.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/quantal/current/quantal-server-cloudimg-amd64-vagrant-disk1.box"
|
dev.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
|
||||||
|
|
||||||
# storm ui
|
# storm ui
|
||||||
dev.vm.network :forwarded_port, :guest => 8080, :host => 8080
|
dev.vm.network :forwarded_port, :guest => 8080, :host => 8080
|
||||||
|
|
Loading…
Reference in New Issue