mirror of
https://github.com/voxpupuli/puppet-hashi_stack.git
synced 2025-05-29 14:55:35 +01:00
moving parameters into appropriate place, adding meaning unit test, first pass on reference file, expanding acceptance test to include meaningful example
using codename as release
This commit is contained in:
parent
46678ae310
commit
ea3e115bd0
6 changed files with 108 additions and 12 deletions
|
@ -6,12 +6,12 @@ describe 'hashi_stack::repo class' do
|
|||
# Using puppet_apply as a helper
|
||||
it 'should work with no errors based on the example' do
|
||||
pp = <<-EOS
|
||||
class { 'hashi_stack::repo': }
|
||||
class { 'hashi_stack::repo': } -> package { 'packer': ensure => installed }
|
||||
EOS
|
||||
|
||||
# Run it twice and test for idempotency
|
||||
expect(apply_manifest(pp).exit_code).to_not eq(1)
|
||||
expect(apply_manifest(pp).exit_code).to eq(0)
|
||||
apply_manifest(pp, catch_failures: true)
|
||||
apply_manifest(pp, catch_changes: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'hashi_stack::repo' do
|
||||
describe 'hashi_stack::repo', type: 'class' do
|
||||
on_supported_os.each do |os, os_facts|
|
||||
context "on #{os}" do
|
||||
let(:facts) { os_facts }
|
||||
|
||||
case os_facts[:os]['family']
|
||||
when 'Debian'
|
||||
it { is_expected.to contain_apt__source('HashiCorp') }
|
||||
when 'RedHat'
|
||||
it { is_expected.to contain_yumrepo('HashiCorp') }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue