Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jhottenstein] Changes to get the integration tests running #119

Merged
merged 1 commit into from Jul 29, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 16 additions & 1 deletion test/README.md
@@ -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
39 changes: 21 additions & 18 deletions test/integration/run_all.sh
@@ -1,20 +1,23 @@
#!/bin/bash

TOPOLOGIES=test/topology/*.rb
COMMANDS=("redstorm" "bundle exec redstorm" "bin/redstorm" )
REDSTORM=""

# export PATH="$PATH:./storm/bin"

# figure correct command
for c in "${COMMANDS[@]}"; do
$c version &> /dev/null
if [ $? -eq 0 ]; then
REDSTORM=$c
break
fi
done
if [ "$REDSTORM" == "" ]; then
COMMANDS=("bundle exec redstorm" "bin/redstorm" )

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"

$REDSTORM_COMMAND version &> /dev/null
if [ $? -ne 0 ]; then
echo "redstorm command not found"
exit 1
fi
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions vagrant/Vagrantfile
Expand Up @@ -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
Expand Down