diff --git a/cdist/context.py b/cdist/context.py index 92e683a3..2855f228 100644 --- a/cdist/context.py +++ b/cdist/context.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2012 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # diff --git a/cdist/test/__init__.py b/cdist/test/__init__.py index 3d9b1a2e..a8c6103b 100644 --- a/cdist/test/__init__.py +++ b/cdist/test/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -24,7 +24,7 @@ import unittest import tempfile cdist_base_path = os.path.abspath( - os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../../../")) + os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../")) cdist_exec_path = os.path.join(cdist_base_path, "scripts/cdist") diff --git a/cdist/test/autorequire/__init__.py b/cdist/test/autorequire/__init__.py index bd763fd3..4b47b06b 100644 --- a/cdist/test/autorequire/__init__.py +++ b/cdist/test/autorequire/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # # 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2012 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -36,7 +37,6 @@ my_dir = op.abspath(op.dirname(__file__)) fixtures = op.join(my_dir, 'fixtures') add_conf_dir = op.join(fixtures, 'conf') - class AutorequireTestCase(test.CdistTestCase): def setUp(self): @@ -44,15 +44,21 @@ class AutorequireTestCase(test.CdistTestCase): os.environ = os.environ.copy() self.target_host = 'localhost' self.temp_dir = self.mkdtemp() - os.environ['__cdist_out_dir'] = self.temp_dir + + self.out_dir = os.path.join(self.temp_dir, "out") + self.remote_out_dir = os.path.join(self.temp_dir, "remote") + + os.environ['__cdist_out_dir'] = self.out_dir + os.environ['__cdist_remote_out_dir'] = self.remote_out_dir self.context = cdist.context.Context( target_host=self.target_host, - remote_copy='/bin/true', - remote_exec='/bin/true', - add_conf_dirs=add_conf_dir, + remote_copy=self.remote_copy, + remote_exec=self.remote_exec, + add_conf_dirs=[add_conf_dir], exec_path=test.cdist_exec_path, debug=False) + self.config = config.Config(self.context) def tearDown(self):