From a8fc8678340c8235953d55710c8f21c5803e0a57 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 10 Oct 2011 15:43:36 +0200 Subject: [PATCH] ++test integration Signed-off-by: Nico Schottelius --- lib/cdist/test/__init__.py | 3 --- lib/cdist/test/test_install.py | 12 +++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/cdist/test/__init__.py b/lib/cdist/test/__init__.py index f614fa05..09429470 100644 --- a/lib/cdist/test/__init__.py +++ b/lib/cdist/test/__init__.py @@ -30,9 +30,6 @@ cdist_commands=["banner", "config", "install"] cdist_exec_path = os.path.abspath( os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../bin/cdist")) -def exec(): - print(cdist_exec_path) - #class UI(unittest.TestCase): # def test_banner(self): # self.assertEqual(subprocess.call([cdist_exec_path, "banner"]), 0) diff --git a/lib/cdist/test/test_install.py b/lib/cdist/test/test_install.py index 9cfae066..d6502b46 100644 --- a/lib/cdist/test/test_install.py +++ b/lib/cdist/test/test_install.py @@ -29,20 +29,22 @@ sys.path.insert(0, os.path.abspath( os.path.join(os.path.dirname(os.path.realpath(__file__)), '../lib'))) import cdist.config - -cdist_exec_path = os.path.abspath( - os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin/cdist")) - +import cdist.test class Install(unittest.TestCase): def setUp(self): self.temp_dir = tempfile.mkdtemp() self.init_manifest = os.path.join(self.temp_dir, "manifest") + + os.environ['__remote_exec'] = "ssh -o User=root -q" + os.environ['__remote_copy'] = "scp -o User=root -q" + self.config = cdist.config.Config("localhost", initial_manifest=self.init_manifest, - exec_path=cdist_exec_path) + exec_path=cdist.test.cdist_exec_path) self.config.link_emulator() + ### NEW FOR INSTALL ############################################################ def test_explorer_ran(self):