Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure examples compile #384

Merged
merged 3 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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