Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes bug where dump action always triggers

#14
added centos6 to Vagrantfile
  • Loading branch information...
commit 053be52d74831be3efdc2ee3f116645bc0acdbc1 1 parent 1b7dd63
@bryanwb authored
View
1  .gitignore
@@ -1 +1,2 @@
*~
+.vagrant
View
1  .vagrant
@@ -1 +0,0 @@
-{"active":{"default":"b3731976-c3ad-4df0-b613-dd40bac50ea2"}}
View
61 Vagrantfile
@@ -1,26 +1,45 @@
Vagrant::Config.run do |config|
- config.vm.box = "ubuntu-1110-server-amd64"
- config.vm.box_url = "http://timhuegdon.com/vagrant-boxes/ubuntu-11.10.box"
-
- config.vm.provision :chef_solo do |chef|
- # point Vagrant at the location of cookbooks you are going to
-# use,
- # for example, a clone of your fork of
- # github.com/travis-ci/travis-cookbooks
- chef.cookbooks_path = ["/home/hitman/chef-repo-opscode/site-cookbooks/",
- "/home/hitman/chef-repo-opscode/cookbooks/"
- ]
-
- # Turn on verbose Chef logging if necessary
- chef.log_level = :debug
-
- # List the recipies you are going to work on/need.
-# chef.add_recipe "build-essential"
- chef.add_recipe "chef_handler"
- chef.add_recipe "minitest-handler"
- chef.add_recipe "ark"
- chef.add_recipe "ark::test"
+ config.vm.define :oneiric do |dist_config|
+ dist_config.vm.box = "ubuntu-1110-server-amd64"
+ dist_config.vm.box_url = "http://timhuegdon.com/vagrant-boxes/ubuntu-11.10.box"
+ dist_config.vm.network :bridged
+
+ dist_config.vm.provision :chef_solo do |chef|
+
+ chef.cookbooks_path = ["/home/hitman/chef-repo-opscode/site-cookbooks/",
+ "/home/hitman/chef-repo-opscode/cookbooks/"
+ ]
+
+ chef.log_level = :debug
+
+ chef.add_recipe "chef_handler"
+ chef.add_recipe "minitest-handler"
+ chef.add_recipe "ark"
+ chef.add_recipe "ark::test"
+
+ end
+ end
+
+ config.vm.define :centos6 do |dist_config|
+ dist_config.vm.box = "centos6"
+ dist_config.vm.box_url = "http://dl.dropbox.com/u/9227672/CentOS-6.0-x86_64-netboot-4.1.6.box"
+ dist_config.vm.network :bridged
+
+ dist_config.vm.provision :chef_solo do |chef|
+
+ chef.cookbooks_path = ["/home/hitman/chef-repo-opscode/site-cookbooks/",
+ "/home/hitman/chef-repo-opscode/cookbooks/"
+ ]
+
+ chef.log_level = :debug
+
+ chef.add_recipe "chef_handler"
+ chef.add_recipe "minitest-handler"
+ chef.add_recipe "ark"
+ chef.add_recipe "ark::test"
+
+ end
end
end
View
19 files/default/tests/minitest/test_test.rb
@@ -13,7 +13,7 @@
package("unzip").must_be_installed
end
- if platform?("freebsd")
+ if RUBY_PLATFORM =~ /freebsd/
it "installs the gnu tar package on freebsc" do
package("gtar").must_be_installed
end
@@ -28,29 +28,30 @@
end
it "cherrypicks the mysql connector and set the correct owner and group" do
- file("/usr/local/foozball/foo1.txt").must_have(:owner, "foobarbaz").and(:group, "foobarbaz")
+ file("/usr/local/foo_cherry_pick/foo1.txt").must_have(:owner, "foobarbaz").and(:group, "foobarbaz")
end
it "creates directory and symlink properly for the full ark install" do
directory("/usr/local/foo-2").must_have(:owner, "foobarbaz").and(:group, "foobarbaz")
- link("/usr/local/foo").must_exist_with(:link_type, :symbolic).and(:to, "/usr/local/foo-2")
+ link("/usr/local/foo").must_exist.with(:link_type, :symbolic).and(:to, "/usr/local/foo-2")
end
it "symlinks multiple binary commands" do
- link("/usr/local/bin/do_foo").must_exist_with(:link_type, :symbolic).and(:to, "/usr/local/foo-2/bin/do_foo")
- link("/usr/local/bin/do_more_foo").must_exist_with(:link_type, :symbolic).and(:to, "/usr/local/foo-2/bin/do_more_foo")
+ link("/usr/local/bin/do_foo").must_exist.with(:link_type, :symbolic).and(:to, "/usr/local/foo-2/bin/do_foo")
+ link("/usr/local/bin/do_more_foo").must_exist.with(:link_type, :symbolic).and(:to, "/usr/local/foo-2/bin/do_more_foo")
end
it "appends to the environment PATH" do
unless RUBY_PLATFORM =~ /freebsd/
- file("/etc/profile.d/foo_append_env.sh").must_include '/usr/local/foo_append_env/bin'
- bin_path_present = !ENV['PATH'].scan(bin_path).empty?
+ file("/etc/profile.d/foo_append_env.sh").must_include '/usr/local/foo_append_env-7.0.26/bin'
+
+ bin_path_present = !ENV['PATH'].scan( '/usr/local/foo_append_env-7.0.26/bin').empty?
assert bin_path_present
end
end
it "doesn't strip top-level directory if specified" do
- directory( "/usr/local/foo_has_binaries_dont_strip/foo_sub").must_exist
+ directory( "/usr/local/foo_dont_strip/foo_sub").must_exist
end
it "successfully compiles haproxy" do
@@ -65,7 +66,7 @@
end
it "creates an alternate prefix_bin" do
- link("/opt/bin/do_foo").must_exist_with(:link_type, :symbolic).and(:to, "/opt/foo_alt_bin/bin/do_foo")
+ link("/opt/bin/do_foo").must_exist.with(:link_type, :symbolic).and(:to, "/opt/foo_alt_bin-3/bin/do_foo")
end
end
View
3  recipes/test.rb
@@ -52,11 +52,10 @@
action :install
end
-ark "foo_has_binaries_dont_strip" do
+ark "foo_dont_strip" do
version "2"
url 'https://github.com/bryanwb/chef-ark/raw/master/files/default/foo.tar.gz'
checksum '5996e676f17457c823d86f1605eaa44ca8a81e70d6a0e5f8e45b51e62e0c52e8'
- has_binaries [ 'bin/do_foo', 'bin/do_more_foo' ]
strip_leading_dir false
action :install
end
Please sign in to comment.
Something went wrong with that request. Please try again.