Skip to content

Commit

Permalink
Cleaned up project structure for running tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
smdahlen committed Mar 27, 2013
1 parent 665b96c commit 693f6a3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
source 'https://rubygems.org'

gemspec

group :development do
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.1.2'
end
12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'bundler/gem_helper'

# Change to the directory of this file.
Dir.chdir(File.expand_path("../", __FILE__))

namespace :gem do
Bundler::GemHelper.install_tasks
end

task :test do
sh 'bash test/test.sh'
end
5 changes: 0 additions & 5 deletions bin/build.sh

This file was deleted.

9 changes: 8 additions & 1 deletion bin/test.sh → test/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
gem uninstall -a vagrant-hostmanager
gem build *.gemspec
gem install *.gem
rm *.gem
vagrant plugin install vagrant-hostmanager

cd test

vagrant up
echo "[server1] /etc/hosts file:"
vagrant ssh server1 -c 'cat /etc/hosts'
Expand All @@ -8,5 +15,5 @@ vagrant destroy server1 -f
echo "[server2] /etc/hosts file:"
vagrant ssh server2 -c 'cat /etc/hosts'
vagrant destroy server2 -f
cd ..

cd ..

0 comments on commit 693f6a3

Please sign in to comment.