fix test cdist.test.config_install.ConfigInstallRunTestCase
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
b3cf339d06
commit
8298bb0bf5
3 changed files with 21 additions and 14 deletions
|
|
@ -27,7 +27,6 @@ from cdist import test
|
|||
from cdist import core
|
||||
|
||||
import cdist
|
||||
import cdist.context
|
||||
import cdist.config
|
||||
import cdist.core.cdist_type
|
||||
import cdist.core.cdist_object
|
||||
|
|
@ -49,22 +48,23 @@ class ConfigInstallRunTestCase(test.CdistTestCase):
|
|||
self.temp_dir = self.mkdtemp()
|
||||
|
||||
self.out_dir = os.path.join(self.temp_dir, "out")
|
||||
self.remote_out_dir = os.path.join(self.temp_dir, "remote")
|
||||
os.mkdir(self.out_dir)
|
||||
self.local = cdist.exec.local.Local(
|
||||
target_host=self.target_host,
|
||||
out_path=self.out_dir)
|
||||
|
||||
os.environ['__cdist_out_dir'] = self.out_dir
|
||||
os.environ['__cdist_remote_out_dir'] = self.remote_out_dir
|
||||
|
||||
self.context = cdist.context.Context(
|
||||
self.remote_dir = os.path.join(self.temp_dir, "remote")
|
||||
os.mkdir(self.remote_dir)
|
||||
self.remote = cdist.exec.remote.Remote(
|
||||
target_host=self.target_host,
|
||||
remote_copy=self.remote_copy,
|
||||
remote_exec=self.remote_exec,
|
||||
exec_path=test.cdist_exec_path,
|
||||
debug=True)
|
||||
base_path=self.remote_dir)
|
||||
|
||||
self.context.local.object_path = object_base_path
|
||||
self.context.local.type_path = type_base_path
|
||||
self.local.object_path = object_base_path
|
||||
self.local.type_path = type_base_path
|
||||
|
||||
self.config = cdist.config.Config(self.context)
|
||||
self.config = cdist.config.Config(self.local, self.remote)
|
||||
|
||||
self.objects = list(core.CdistObject.list_objects(object_base_path, type_base_path))
|
||||
self.object_index = dict((o.name, o) for o in self.objects)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue