diff --git a/Puppetfile b/Puppetfile index af725cc36..4ebc8b287 100644 --- a/Puppetfile +++ b/Puppetfile @@ -55,7 +55,7 @@ mod 'gnocchi', :git => 'https://github.com/stackforge/puppet-gnocchi.git' mod 'haproxy', - :commit => '3007560fc47da48d576890b1823e0ccfac3d9207', + :commit => '6bca1f0bc31bfeb397635c9867d51a847caddbcd', :git => 'https://github.com/puppetlabs/puppetlabs-haproxy.git' mod 'heat', diff --git a/haproxy/.fixtures.yml b/haproxy/.fixtures.yml index c682e73b6..ecfef31df 100644 --- a/haproxy/.fixtures.yml +++ b/haproxy/.fixtures.yml @@ -2,7 +2,7 @@ fixtures: repositories: concat: repo: "git://github.com/puppetlabs/puppetlabs-concat.git" - ref: '1.0.0' + ref: '1.2.3' stdlib: repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git" ref: '2.4.0' diff --git a/haproxy/.gitignore b/haproxy/.gitignore index b5db85e05..874db461f 100644 --- a/haproxy/.gitignore +++ b/haproxy/.gitignore @@ -7,3 +7,4 @@ spec/fixtures/ coverage/ .idea/ *.iml +log/ diff --git a/haproxy/.travis.yml b/haproxy/.travis.yml index cbf6f11df..7e8ed57bb 100644 --- a/haproxy/.travis.yml +++ b/haproxy/.travis.yml @@ -20,8 +20,5 @@ matrix: env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - rvm: 1.8.7 env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - allow_failures: - - rvm: 2.1.6 - env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" notifications: email: false diff --git a/haproxy/metadata.json b/haproxy/metadata.json index b5e04722b..29d362e11 100644 --- a/haproxy/metadata.json +++ b/haproxy/metadata.json @@ -68,6 +68,6 @@ ], "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 2.4.0 < 5.0.0"}, - {"name":"puppetlabs/concat","version_requirement":">= 1.1.0 < 2.0.0"} + {"name":"puppetlabs/concat","version_requirement":">= 1.2.3 < 2.0.0"} ] } diff --git a/haproxy/spec/defines/peer_spec.rb b/haproxy/spec/defines/peer_spec.rb index 32ccbf82a..677e0b56c 100644 --- a/haproxy/spec/defines/peer_spec.rb +++ b/haproxy/spec/defines/peer_spec.rb @@ -4,8 +4,9 @@ let(:title) { 'dero' } let(:facts) do { - :ipaddress => '1.1.1.1', - :hostname => 'dero', + :ipaddress => '1.1.1.1', + :hostname => 'dero', + :concat_basedir => '/foo', } end diff --git a/haproxy/spec/defines/peers_spec.rb b/haproxy/spec/defines/peers_spec.rb index d80120ce4..95b768a68 100644 --- a/haproxy/spec/defines/peers_spec.rb +++ b/haproxy/spec/defines/peers_spec.rb @@ -1,7 +1,10 @@ require 'spec_helper' describe 'haproxy::peers' do - let(:facts) {{ :ipaddress => '1.1.1.1' }} + let(:facts) {{ + :ipaddress => '1.1.1.1', + :concat_basedir => '/foo', + }} context "when no options are passed" do let(:title) { 'bar' } diff --git a/haproxy/spec/spec_helper_acceptance.rb b/haproxy/spec/spec_helper_acceptance.rb index 4639ece26..4e2c457fb 100644 --- a/haproxy/spec/spec_helper_acceptance.rb +++ b/haproxy/spec/spec_helper_acceptance.rb @@ -5,7 +5,10 @@ unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' # This will install the latest available package on el and deb based # systems fail on windows and osx, and install via gem on other *nixes - foss_opts = { :default_action => 'gem_install' } + foss_opts = { + :default_action => 'gem_install', + :version => (ENV['PUPPET_VERSION'] || '3.8.1'), + } if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end diff --git a/haproxy/spec/unit/facter/haproxy_version_spec.rb b/haproxy/spec/unit/facter/haproxy_version_spec.rb index fbd68e6a9..75289fd69 100644 --- a/haproxy/spec/unit/facter/haproxy_version_spec.rb +++ b/haproxy/spec/unit/facter/haproxy_version_spec.rb @@ -11,8 +11,8 @@ HA-Proxy version 1.5.3 2014/07/25 Copyright 2000-2014 Willy Tarreau EOS - Facter::Util::Resolution.expects(:which).with("haproxy").returns(true) - Facter::Util::Resolution.expects(:exec).with("haproxy -v 2>&1").returns(haproxy_version_output) + Facter::Util::Resolution.expects(:which).at_least(1).with("haproxy").returns(true) + Facter::Util::Resolution.expects(:exec).at_least(1).with("haproxy -v 2>&1").returns(haproxy_version_output) Facter.fact(:haproxy_version).value.should == "1.5.3" end end @@ -20,8 +20,8 @@ context "haproxy not present" do it do Facter::Util::Resolution.stubs(:exec) - Facter::Util::Resolution.expects(:which).with("haproxy").returns(false) + Facter::Util::Resolution.expects(:which).at_least(1).with("haproxy").returns(false) Facter.fact(:haproxy_version).should be_nil end end -end \ No newline at end of file +end