Use assert_nothing_raised

This commit is contained in:
Andre Nathan 2014-01-14 08:54:43 -02:00
parent 0c3abf0de2
commit 3ff240462e

View file

@ -64,7 +64,9 @@ class TestLXCRunning < Test::Unit::TestCase
def test_container_cgroups def test_container_cgroups
max_mem = @container.cgroup_item('memory.max_usage_in_bytes') max_mem = @container.cgroup_item('memory.max_usage_in_bytes')
cur_lim = @container.cgroup_item('memory.limit_in_bytes') cur_lim = @container.cgroup_item('memory.limit_in_bytes')
assert_not_nil(@container.set_cgroup_item('memory.limit_in_bytes', max_mem)) assert_nothing_raised(LXC::Error) do
@container.set_cgroup_item('memory.limit_in_bytes', max_mem)
end
assert_not_equal(cur_lim, @container.cgroup_item('memory.limit_in_bytes')) assert_not_equal(cur_lim, @container.cgroup_item('memory.limit_in_bytes'))
end end