Skip to content

Commit

Permalink
Update haproxy to 6bca1f0bc31bfeb397635c9867d51a847caddbcd
Browse files Browse the repository at this point in the history
6bca1f0bc31bfeb397635c9867d51a847caddbcd Merge pull request redhat-openstack#187 from justinstoller/maint/master/set-puppet-version
6512813f38733e5ece696d41145a6ba2273fe59f (maint) allow setting PUPPET_VERSION in acceptance
8b25a7b950825c9e5430b7fc3b68ad257de27711 Merge pull request redhat-openstack#184 from puppetlabs/travisci_update
b7c253984e6bc5169d4df2fbb83f3510174d5dbb Updated travisci file to remove allow_failures on Puppet 4
611cecbec7bea98a359d3afa82952b258d2ca5b6 Merge pull request redhat-openstack#186 from tphoney/puppet27_relax_unittest
c1bf471eb1a0bf7f88a1efd47d8633ed1e185381 relax unit test for puppet 2.7
346c213d815ec2ed13bb839970c4db4025c5c5b1 Merge pull request redhat-openstack#185 from tphoney/puppet4_unittest
cf2fc938cd40916b83bc595a296257c6016ebdac changes to fix puppet4 unit tests

Change-Id: I0113da26685337eefb593cecd556ec88a4ee47ca
  • Loading branch information
xbezdick committed Jun 15, 2015
1 parent de33411 commit 753261a
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion haproxy/.fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions haproxy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ spec/fixtures/
coverage/
.idea/
*.iml
log/
3 changes: 0 additions & 3 deletions haproxy/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion haproxy/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
]
}
5 changes: 3 additions & 2 deletions haproxy/spec/defines/peer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion haproxy/spec/defines/peers_spec.rb
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
5 changes: 4 additions & 1 deletion haproxy/spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions haproxy/spec/unit/facter/haproxy_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
HA-Proxy version 1.5.3 2014/07/25
Copyright 2000-2014 Willy Tarreau <[email protected]>
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

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
end

0 comments on commit 753261a

Please sign in to comment.