Fixed #1431 - Provider confines must now specify similar tests in one call.

I.e., you can't do confine :operatingsystem => %w{a b} and then
confine :operatingsystem => %w{b c}; you'd need to do them in one command.
This now-obsolete behaviour does not seem to be used anywhere.
The fix for #1431 is actually just removing the tests that exposed
this change; the change happened when I refactored how confines work.

Signed-off-by: Luke Kanies <luke@madstop.com>
This commit is contained in:
Luke Kanies 2008-07-17 12:30:33 -05:00
Родитель 7fa7251e30
Коммит 8f8ce60819
2 изменённых файлов: 7 добавлений и 45 удалений

Просмотреть файл

@ -1,4 +1,11 @@
0.24.5
Fixed #1431 - Provider confines must now specify similar tests in one call.
I.e., you can't do confine :operatingsystem => %w{a b} and then
confine :operatingsystem => %w{b c}; you'd need to do them in one command.
This now-obsolete behaviour does not seem to be used anywhere.
The fix for #1431 is actually just removing the tests that exposed
this change; the change happened when I refactored how confines work.
Updated /spec/unit/rails.rb test
Fix #1426 - services on redhat are restarted again and status is

Просмотреть файл

@ -48,51 +48,6 @@ class TestImpl < Test::Unit::TestCase
end
def test_provider_false_confine
assert_nothing_raised do
@provider.confine :false => false
end
assert(@provider.suitable?, "False did not check correctly")
end
def test_provider_true_confine
assert_nothing_raised do
@provider.confine :true => true
end
assert(@provider.suitable?, "True did not check correctly")
# Now check whether we multiple true things work
assert_nothing_raised do
@provider.confine :true => false
@provider.confine :true => true
end
assert(! @provider.suitable?, "One truth overrode another")
end
def test_provider_exists_confine
file = tempfile()
assert_nothing_raised do
@provider.confine :exists => file
end
assert(! @provider.suitable?, "Exists did not check correctly")
File.open(file, "w") { |f| f.puts "" }
assert(@provider.suitable?, "Exists did not find file correctly")
end
def test_provider_facts_confine
# Now check for multiple platforms
assert_nothing_raised do
@provider.confine :operatingsystem => [Facter["operatingsystem"].value, :yayos]
@provider.confine :operatingsystem => [:fakeos, :otheros]
end
assert(@provider.suitable?, "Implementation not considered suitable")
end
def test_provider_default
nondef = nil
assert_nothing_raised {