Improve Puppet tests

Change-Id: I1df0899acdff98386f7f71599afccf480aa2f9ce
This commit is contained in:
Simon Pasquier 2015-08-18 10:51:48 +02:00
parent a0abd257af
commit 522d962c2c
5 changed files with 45 additions and 2 deletions

View File

@ -3,6 +3,15 @@ fixtures:
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib"
ref: "4.7.0"
concat:
repo: "git://github.com/puppetlabs/puppetlabs-concat"
ref: "1.2.4"
collectd:
repo: "git://github.com/puppet-community/puppet-collectd"
ref: "v3.2.0"
apache:
repo: "git://github.com/puppetlabs/puppetlabs-apache"
ref: "1.4.0"
symlinks:
lma_collector: "#{source_dir}"
heka: "#{source_dir}/../heka"

View File

@ -21,4 +21,7 @@ group :development, :test do
gem 'rspec-puppet-facts'
gem 'puppetlabs_spec_helper'
gem 'metadata-json-lint'
# Need to use master branch of puppet-lint because of
# https://github.com/rodjek/puppet-lint/issues/355
gem 'puppet-lint', :git => 'https://github.com/rodjek/puppet-lint.git'
end

View File

@ -1,3 +1,9 @@
GIT
remote: https://github.com/rodjek/puppet-lint.git
revision: 2546fed6be894bbcff15c3f48d4b6f6bc15d94d1
specs:
puppet-lint (0.3.2)
GEM
remote: https://rubygems.org/
specs:
@ -17,7 +23,6 @@ GEM
facter (~> 1.6)
hiera (~> 1.0)
rgen (~> 0.6.5)
puppet-lint (1.1.0)
puppet-syntax (2.0.0)
rake
puppetlabs_spec_helper (0.10.3)
@ -55,6 +60,7 @@ PLATFORMS
DEPENDENCIES
metadata-json-lint
puppet (~> 3.4.0)
puppet-lint!
puppetlabs_spec_helper
rake
rspec

View File

@ -21,7 +21,7 @@
"dependencies": [
{"name": "puppetlabs/apache", "version_requirement": ">= 1.4.0"},
{"name": "puppetlabs/stdlib", "version_requirement": "4.x"},
{"name": "pdxcat/collectd", "version_requirement": "3.x"},
{"name": "pdxcat/collectd", "version_requirement": ">= 3.2.0"},
{"name": "mirantis/heka", "version_requirement": "1.x"}
]
}

View File

@ -0,0 +1,25 @@
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
require 'spec_helper'
describe 'lma_collector' do
let(:facts) do
{:kernel => 'Linux', :operatingsystem => 'Ubuntu',
:osfamily => 'Debian'}
end
describe 'with defaults' do
it { is_expected.to contain_class('Heka') }
end
end