module-puppetlabs-mysql/spec/classes/graceful_failures_spec.rb
Hunter Haugen 1812fbca25 Rewrite some of the unit tests to work on more platforms.
This commit introduces puppet_facts, a gem that allows easier testing
against PE platforms.  We're using this gem to automatically parse the
metadata.json and test against appropriate versions of PE on platforms
we support.

We start by only running against centos-6-x86_64 and ubuntu 14.04 on a
regular basis but this is implemented as an ENV so it can be overwritten
by CI systems to test against all PE platforms.
2014-08-07 16:27:17 -04:00

16 lines
451 B
Ruby

require 'spec_helper'
describe 'mysql::server' do
on_pe_unsupported_platforms.each do |pe_version,pe_platforms|
pe_platforms.each do |pe_platform,facts|
describe "on #{pe_version} #{pe_platform}" do
let(:facts) { facts }
context 'should gracefully fail' do
it { should_not contain_class('mysql::server') }
it { should raise_error(/Unsupported osfamily: foo/) }
end
end
end
end
end