fixup manifest tests

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-11-06 17:01:20 +01:00
parent 8dfbb4a9dd
commit bb1a8d8e66
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# 2011 Steven Armstrong (steven-cdist at armstrong.cc) # 2011 Steven Armstrong (steven-cdist at armstrong.cc)
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
# #
# This file is part of cdist. # This file is part of cdist.
# #

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) # 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc)
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
# #
# This file is part of cdist. # This file is part of cdist.
# #
@ -37,8 +38,7 @@ from cdist.core import manifest
import os.path as op import os.path as op
my_dir = op.abspath(op.dirname(__file__)) my_dir = op.abspath(op.dirname(__file__))
fixtures = op.join(my_dir, 'fixtures') fixtures = op.join(my_dir, 'fixtures')
local_base_path = fixtures conf_dir = op.join(fixtures, 'conf')
class ManifestTestCase(test.CdistTestCase): class ManifestTestCase(test.CdistTestCase):
@ -48,8 +48,13 @@ class ManifestTestCase(test.CdistTestCase):
self.temp_dir = self.mkdtemp() self.temp_dir = self.mkdtemp()
self.target_host = 'localhost' self.target_host = 'localhost'
out_path = self.temp_dir out_path = self.temp_dir
self.local = local.Local(self.target_host, local_base_path, out_path) self.local = local.Local(
target_host=self.target_host,
out_path=out_path,
exec_path = cdist.test.cdist_exec_path,
add_conf_dirs=[conf_dir])
self.local.create_files_dirs() self.local.create_files_dirs()
self.manifest = manifest.Manifest(self.target_host, self.local) self.manifest = manifest.Manifest(self.target_host, self.local)
self.log = logging.getLogger(self.target_host) self.log = logging.getLogger(self.target_host)