move / correct tests in object and config_install
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
ef45cd5ce0
commit
e03f5d08dd
2 changed files with 6 additions and 32 deletions
|
@ -101,20 +101,6 @@ class ConfigInstallRunTestCase(test.CdistTestCase):
|
||||||
pass
|
pass
|
||||||
self.assertTrue(first.state == first.STATE_DONE)
|
self.assertTrue(first.state == first.STATE_DONE)
|
||||||
|
|
||||||
|
|
||||||
def test_non_empty_object_list(self):
|
|
||||||
"""Ensure the object list returned is not empty"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_requirement_not_found(self):
|
|
||||||
"""Ensure an exception is thrown for missing depedencies"""
|
|
||||||
cdist_object = self.object_index['__first/man']
|
|
||||||
cdist_object.requirements = ['__does/not/exist']
|
|
||||||
|
|
||||||
with self.assertRaises(core.cdist_object.RequirementNotFoundError):
|
|
||||||
# Use list, as generator does not (yet) raise the error
|
|
||||||
list(cdist_object.find_requirements_by_name(cdist_object.requirements))
|
|
||||||
|
|
||||||
def test_unresolvable_requirements(self):
|
def test_unresolvable_requirements(self):
|
||||||
"""Ensure an exception is thrown for unresolvable depedencies"""
|
"""Ensure an exception is thrown for unresolvable depedencies"""
|
||||||
|
|
||||||
|
|
|
@ -255,23 +255,11 @@ class ObjectResolveRequirementsTestCase(test.CdistTestCase):
|
||||||
|
|
||||||
self.assertEqual(expected_requirements, found_requirements)
|
self.assertEqual(expected_requirements, found_requirements)
|
||||||
|
|
||||||
def test_dependency_resolution(self):
|
|
||||||
first_man = self.object_index['__first/man']
|
|
||||||
second_on_the = self.object_index['__second/on-the']
|
|
||||||
third_moon = self.object_index['__third/moon']
|
|
||||||
first_man.requirements = [second_on_the.name]
|
|
||||||
second_on_the.requirements = [third_moon.name]
|
|
||||||
|
|
||||||
# FIXME :-)
|
|
||||||
self.assertTrue(False)
|
|
||||||
# self.assertEqual(
|
|
||||||
# self.dependency_resolver.dependencies['__first/man'],
|
|
||||||
# [third_moon, second_on_the, first_man]
|
|
||||||
# )
|
|
||||||
|
|
||||||
def test_requirement_not_found(self):
|
def test_requirement_not_found(self):
|
||||||
first_man = self.object_index['__first/man']
|
"""Ensure an exception is thrown for missing depedencies"""
|
||||||
first_man.requirements = ['__does/not/exist']
|
cdist_object = self.object_index['__first/man']
|
||||||
with self.assertRaises(core.cdist_object.RequirementNotFoundError):
|
cdist_object.requirements = ['__does/not/exist']
|
||||||
first_man.find_requirements_by_name(first_man.requirements)
|
|
||||||
|
|
||||||
|
with self.assertRaises(core.cdist_object.RequirementNotFoundError):
|
||||||
|
# Use list, as generator does not (yet) raise the error
|
||||||
|
list(cdist_object.find_requirements_by_name(cdist_object.requirements))
|
||||||
|
|
Loading…
Reference in a new issue