summaryrefslogtreecommitdiffstats
path: root/tests/tests.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-03-23 16:36:36 -0400
committerJim Meyering <jim@meyering.net>2007-03-23 16:36:36 -0400
commitae2506b839ba787dc06004d2eab5cb528379186f (patch)
treeb3b2723e3730b6478255e229840450aabbd24e1f /tests/tests.py
parente639b419fb91246436d673569ccf7bced60c66e5 (diff)
downloadthird_party-cobbler-ae2506b839ba787dc06004d2eab5cb528379186f.tar.gz
third_party-cobbler-ae2506b839ba787dc06004d2eab5cb528379186f.tar.xz
third_party-cobbler-ae2506b839ba787dc06004d2eab5cb528379186f.zip
This is 0.4.5
Diffstat (limited to 'tests/tests.py')
-rw-r--r--tests/tests.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/tests.py b/tests/tests.py
index 2a663e6..e58b8da 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -188,11 +188,6 @@ class Additions(BootTest):
self.assertTrue(profile.set_distro("testdistro0"))
self.assertTrue(profile.set_kickstart("http://127.0.0.1/foo"))
# no slashes or wildcards in name
- self.assertTrue(profile.set_virt_name("virt"))
- self.assertTrue(profile.set_virt_name("virt"))
- self.failUnlessRaises(CobblerException, profile.set_virt_name, "virt/foo")
- self.failUnlessRaises(CobblerException, profile.set_virt_name, "virt*foo")
- self.failUnlessRaises(CobblerException, profile.set_virt_name, "virt?foo")
# sizes must be integers
self.assertTrue(profile.set_virt_file_size("54321"))
# temporarily commenting out failing test
@@ -299,46 +294,6 @@ class TestCLIBasic(BootTest):
app = "/usr/bin/python"
self.assertTrue(subprocess.call([app,"cobbler/cobbler.py","list"]) == 0)
-class TestImport(BootTest):
-
- def test_import(self):
- # testing the import code.
- self.api.clear()
- cwd = os.getcwd()
- tests = os.path.join(cwd,"tests","import_testdata")
- self.api.import_tree(tests, None, None)
- self.api.serialize()
-
- # below:
- # partial name of distro: current count, passing count, required arch
- haystacks = {
- "import_testdata_RHEL-4_U4_AS_ia64_tree_images_pxeboot" : [0, 1, "ia64" ],
- "import_testdata_RHEL-4_U4_AS_i386_tree_images_pxeboot" : [0, 1, "x86" ],
- "import_testdata_RHEL-4_U4_AS_x86_64_tree_images_pxeboot" : [0, 1, "x86_64" ],
- "import_testdata_core_5_i386_os_images_pxeboot" : [ 0, 1, "x86" ],
- "import_testdata_core_5_i386_os_images_xen" : [0, 1, "x86" ],
- }
-
- # first go through all found distros and count the matches
- for distro in self.api.distros():
- got_it = False
- for match in haystacks.keys():
- if distro.name.find(match) != -1:
- found = haystacks[match]
- found[0] = found[0] + 1
- # check for architecture mismatches
- self.failUnlessEqual(distro.arch, found[2], "architecture detection: %s vs %s on %s" % (distro.arch, found[2], distro.name))
- got_it = True
- if not got_it: # hasn't :)
- self.fail("imported foreign distro: %s" % distro.name)
-
- # now check the required number of matches vs actual.
- # this checks to ensure unsupported arches aren't imported and there
- # are no duplicate imports
- for match in haystacks.keys():
- found = haystacks[match]
- self.failUnlessEqual(found[0], found[1], "mismatched counts: %d vs %d for %s" % (found[0], found[1], match))
-
if __name__ == "__main__":
if not os.path.exists("setup.py"):
print "tests: must invoke from top level directory"