diff --git a/spec/type/base/host_spec.rb b/spec/type/base/host_spec.rb index 0cc3819e..9ead8b84 100644 --- a/spec/type/base/host_spec.rb +++ b/spec/type/base/host_spec.rb @@ -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 + diff --git a/spec/type/linux/selinux_spec.rb b/spec/type/linux/selinux_spec.rb index 0d8eae67..6995fa56 100644 --- a/spec/type/linux/selinux_spec.rb +++ b/spec/type/linux/selinux_spec.rb @@ -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