fix selinux label tests for redhat family

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
Dominik Richter 2015-09-16 08:27:35 +02:00
parent d16f76c9ce
commit 682fe8f261
6 changed files with 37 additions and 13 deletions

View file

@ -58,9 +58,13 @@ describe 'file interface' do
file.size.must_equal(0)
end
it 'has no selinux_label' do
it 'has selinux label handling' do
if os[:family] == 'redhat'
file.selinux_label.must_equal('unconfined_u:object_r:tmp_t:s0')
else
file.selinux_label.must_equal(nil)
end
end
it 'has no product_version' do
file.product_version.must_equal(nil)

View file

@ -58,9 +58,13 @@ describe 'file interface' do
file.size.must_equal(0)
end
it 'has no selinux_label' do
it 'has selinux label handling' do
if os[:family] == 'redhat'
file.selinux_label.must_equal('system_u:object_r:null_device_t:s0')
else
file.selinux_label.must_equal(nil)
end
end
it 'has no product_version' do
file.product_version.must_equal(nil)

View file

@ -63,9 +63,13 @@ describe 'file interface' do
file.size.must_be_close_to(11, 4)
end
it 'has no selinux_label' do
it 'has selinux label handling' do
if os[:family] == 'redhat'
file.selinux_label.must_equal('unconfined_u:object_r:user_tmp_t:s0')
else
file.selinux_label.must_equal(nil)
end
end
it 'has no product_version' do
file.product_version.must_equal(nil)

View file

@ -55,13 +55,16 @@ describe 'file interface' do
end
it 'has inode size' do
# Must be around 11 Bytes, +- 4
file.size.must_be_close_to(4096, 4094)
end
it 'has no selinux_label' do
it 'has selinux label handling' do
if os[:family] == 'redhat'
file.selinux_label.must_equal('unconfined_u:object_r:user_tmp_t:s0')
else
file.selinux_label.must_equal(nil)
end
end
it 'has no product_version' do
file.product_version.must_equal(nil)

View file

@ -61,9 +61,14 @@ describe 'file interface' do
file.size.must_equal(0)
end
it 'has no selinux_label' do
it 'has selinux label handling' do
if os[:family] == 'redhat'
file.selinux_label.must_equal('unconfined_u:object_r:user_tmp_t:s0')
else
file.selinux_label.must_equal(nil)
end
end
it 'has no product_version' do
file.product_version.must_equal(nil)

View file

@ -67,9 +67,13 @@ describe 'file interface' do
file.size.must_be_close_to(11, 4)
end
it 'has no selinux_label' do
it 'has selinux label handling' do
if os[:family] == 'redhat'
file.selinux_label.must_equal('unconfined_u:object_r:user_tmp_t:s0')
else
file.selinux_label.must_equal(nil)
end
end
it 'has no product_version' do
file.product_version.must_equal(nil)