add test for Explorer run_global_explorers

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-20 10:55:11 +02:00
parent 97ab6effa4
commit 6f82aef704
2 changed files with 9 additions and 1 deletions

View file

@ -62,7 +62,7 @@ class ExplorerClassTestCase(test.CdistTestCase):
shutil.rmtree(self.remote_base_path)
def test_list_global_explorer_names(self):
expected = ['global']
expected = ['foobar', 'global']
self.assertEqual(self.explorer.list_global_explorer_names(), expected)
def test_transfer_global_explorers(self):
@ -76,6 +76,12 @@ class ExplorerClassTestCase(test.CdistTestCase):
output = self.explorer.run_global_explorer('global')
self.assertEqual(output, 'global\n')
def test_run_global_explorers(self):
out_path = self.mkdtemp()
self.explorer.run_global_explorers(out_path)
self.assertEqual(os.listdir(out_path), ['foobar', 'global'])
shutil.rmtree(out_path)
def test_list_type_explorer_names(self):
cdist_type = core.Type(self.local.type_path, '__test_type')
expected = cdist_type.explorers

View file

@ -0,0 +1,2 @@
#!/bin/sh
echo foobar