1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-12-16 05:10:36 +00:00

cleanup beaker tests

- use beaker/puppet_install_helper to install puppet
- installed dependency modules like they are listed in the metadata.json
- changed apt repo source from https to http, https produced ssl errors under certain ruby versions and needs additional packages on some systems and the packages are signed anyways
This commit is contained in:
Max Wilhelm 2016-01-22 18:52:12 +01:00
parent afc59cb27e
commit 9eb93da056
6 changed files with 10 additions and 18 deletions

View File

@ -6,4 +6,4 @@ gem 'puppetlabs_spec_helper', '>= 0.8.2'
gem 'puppet-lint', '>= 1.0.0' gem 'puppet-lint', '>= 1.0.0'
gem 'facter', '>= 1.7.0' gem 'facter', '>= 1.7.0'
gem 'beaker-rspec' gem 'beaker-rspec'
gem 'pry' gem 'beaker-puppet_install_helper'

View File

@ -264,6 +264,7 @@ To run the tests install the ruby dependencies with `bundler` and execute
bundle install --path vendor/bundle bundle install --path vendor/bundle
bundle exec rake spec bundle exec rake spec
bundle exec rake lint bundle exec rake lint
bundle exec rake beaker BEAKER_set=ubuntu-server-1204-x64
``` ```
## License ## License

View File

@ -2,12 +2,12 @@
# #
class fluentd::repo::apt ( class fluentd::repo::apt (
$ensure = 'present', $ensure = 'present',
$location = downcase("https://packages.treasuredata.com/2/${::operatingsystem}/${::lsbdistcodename}"), $location = downcase("http://packages.treasuredata.com/2/${::operatingsystem}/${::lsbdistcodename}"),
$release = $::lsbdistcodename, $release = $::lsbdistcodename,
$repos = 'contrib', $repos = 'contrib',
$key = { $key = {
'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F', 'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F',
'source' => 'https://packages.treasuredata.com/GPG-KEY-td-agent' 'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent'
}, },
) { ) {

View File

@ -4,9 +4,6 @@ HOSTS:
- master - master
platform: ubuntu-12.04-amd64 platform: ubuntu-12.04-amd64
box: puppetlabs/ubuntu-12.04-64-nocm box: puppetlabs/ubuntu-12.04-64-nocm
#box: wywy-ubuntu-12.04.5
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-12.04-64-nocm
#box_url: http://files.munich.wywy.com/vagrant/box/wywy-ubuntu-12.04.5.box
hypervisor: vagrant hypervisor: vagrant
CONFIG: CONFIG:
log_level: verbose log_level: verbose

View File

@ -15,12 +15,12 @@ describe 'fluentd::repo::apt', :type => :class do
should contain_class('apt') should contain_class('apt')
should contain_apt__source('treasure-data').with({ should contain_apt__source('treasure-data').with({
'ensure' => 'present', 'ensure' => 'present',
'location' => 'https://packages.treasuredata.com/2/ubuntu/precise', 'location' => 'http://packages.treasuredata.com/2/ubuntu/precise',
'release' => 'precise', 'release' => 'precise',
'repos' => 'contrib', 'repos' => 'contrib',
'key' => { 'key' => {
'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F', 'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F',
'source' => 'https://packages.treasuredata.com/GPG-KEY-td-agent' 'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent'
} }
}) })
} }

View File

@ -1,13 +1,7 @@
require 'beaker-rspec' require 'beaker-rspec'
require 'pry' require 'beaker/puppet_install_helper'
hosts.each do |host| run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'
# Install Puppet
on host, 'apt-get -y install ruby1.9.1 rubygems ruby1.9.1-dev libaugeas-ruby1.9.1'
on host, 'update-alternatives --set ruby /usr/bin/ruby1.9.1'
on host, 'update-alternatives --set gem /usr/bin/gem1.9.1'
on host, install_puppet
end
RSpec.configure do |c| RSpec.configure do |c|
# Project root # Project root
@ -21,8 +15,8 @@ RSpec.configure do |c|
# Install module # Install module
puppet_module_install(:source => module_root, :module_name => 'fluentd') puppet_module_install(:source => module_root, :module_name => 'fluentd')
hosts.each do |host| hosts.each do |host|
on host, puppet('module', 'install', 'puppetlabs-stdlib', '--version', '4.9.0') on host, puppet('module', 'install', 'puppetlabs-stdlib', '--version', '4.6.0')
on host, puppet('module', 'install', 'puppetlabs-apt', '--version', '2.1.1') on host, puppet('module', 'install', 'puppetlabs-apt', '--version', '2.0.0')
end end
end end
end end