Cleaned up project structure for running tests.

This commit is contained in:
Shawn Dahlen 2013-03-27 16:13:22 -04:00
parent 665b96c044
commit 693f6a3181
4 changed files with 20 additions and 10 deletions

View File

@ -1,7 +1,3 @@
source 'https://rubygems.org'
gemspec
group :development do
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.1.2'
end

12
Rakefile Normal file
View File

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

View File

@ -1,5 +0,0 @@
rm *.gem
gem uninstall -a vagrant-hostmanager
gem build *.gemspec
gem install *.gem
vagrant plugin install vagrant-hostmanager

View File

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