From a98bc364a385a83290711a6da9592566186b7d20 Mon Sep 17 00:00:00 2001 From: Ranjib Dey Date: Wed, 15 Jan 2014 00:49:23 -0800 Subject: [PATCH] tests should not fail if there are pre-existing containers --- test/test_lxc_class_methods.rb | 2 +- test/test_lxc_running.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_lxc_class_methods.rb b/test/test_lxc_class_methods.rb index 736ce4f..8ff41b3 100644 --- a/test/test_lxc_class_methods.rb +++ b/test/test_lxc_class_methods.rb @@ -15,7 +15,7 @@ class TestLXCClassMethods < Test::Unit::TestCase end def test_list_containers - assert_equal([@name], LXC.list_containers) + assert(LXC.list_containers.include?('test')) end def test_arch_to_personality diff --git a/test/test_lxc_running.rb b/test/test_lxc_running.rb index 6831428..b2a3c26 100644 --- a/test/test_lxc_running.rb +++ b/test/test_lxc_running.rb @@ -103,7 +103,7 @@ class TestLXCRunning < Test::Unit::TestCase def test_container_listed containers = LXC.list_containers - assert_equal(1, containers.length) - assert_equal(@name, containers.first) + assert(containers.length > 0) + assert(containers.include?(@name)) end end