Skip to content

Commit

Permalink
Merge pull request #384 from ekohl/better-examples
Browse files Browse the repository at this point in the history
Ensure examples compile
  • Loading branch information
bastelfreak authored Jan 27, 2024
2 parents a3653da + 4b767cc commit 33c451c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
Empty file modified examples/enable_and_targeted.pp
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion examples/minimal.pp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
#

class { 'selinux':
type => 'minimal',
type => 'minimum',
}
Empty file modified examples/mls.pp
100755 → 100644
Empty file.
Empty file modified examples/targeted.pp
100755 → 100644
Empty file.
20 changes: 20 additions & 0 deletions spec/hosts/examples_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'example.com' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

Dir['examples/**/*.pp'].each do |example|
context "with #{example}" do
# Would be nicer to override the manifest
let(:pre_condition) { File.read(example) }

it { is_expected.to compile.with_all_deps }
end
end
end
end
end

0 comments on commit 33c451c

Please sign in to comment.