Skip to content

Commit

Permalink
Merge pull request #535 from uroesch/spec-fixup
Browse files Browse the repository at this point in the history
Adding spec tests for host's :ip{4,6}_address and selinux's with_policy
  • Loading branch information
mizzy committed Sep 18, 2015
2 parents 73eca8e + 38ad1e1 commit e5ee36e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/type/base/host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@
let(:stdout) { "1.2.3.4\r\n" }
its(:ipaddress) { should eq '1.2.3.4' }
end

describe host('example.jp') do
let(:stdout) { "1.2.3.4\r\n" }
its(:ipv4_address) { should match(/^[\d.]+$/) }
end

describe host('example.jp') do
let(:stdout) { "2001:db8::1234\r\n" }
its(:ipv6_address) { should match(/^[a-f\d:]+$/i) }
end

8 changes: 8 additions & 0 deletions spec/type/linux/selinux_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
it { should be_enforcing }
end

describe selinux do
it { should be_enforcing.with_policy('mls') }
end

describe selinux do
it { should be_permissive }
end

describe selinux do
it { should be_permissive.with_policy('targeted') }
end

describe selinux do
it { should be_disabled }
end

0 comments on commit e5ee36e

Please sign in to comment.