test type manifest environment
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
5df8479c5a
commit
9a33bd3b90
1 changed files with 18 additions and 4 deletions
|
@ -81,7 +81,21 @@ class ManifestTestCase(unittest.TestCase):
|
||||||
# for line in output.split('\n'):
|
# for line in output.split('\n'):
|
||||||
# print(line)
|
# print(line)
|
||||||
|
|
||||||
# def test_type_manifest(self):
|
def test_type_manifest_environment(self):
|
||||||
# cdist_type = core.Type(self.local.type_base_path, '__moon')
|
cdist_type = core.Type(self.local.type_base_path, '__dump_environment')
|
||||||
# cdist_object = core.Object(cdist_type, self.local.object_base_path, 'Saturn')
|
cdist_object = core.Object(cdist_type, self.local.object_base_path, 'whatever')
|
||||||
# self.manifest.run_type_manifest(cdist_object)
|
|
||||||
|
output_string = self.manifest.run_type_manifest(cdist_object)
|
||||||
|
output_dict = {}
|
||||||
|
for line in output_string.split('\n'):
|
||||||
|
if line:
|
||||||
|
key,value = line.split(': ')
|
||||||
|
output_dict[key] = value
|
||||||
|
self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path))
|
||||||
|
self.assertEqual(output_dict['__target_host'], self.local.target_host)
|
||||||
|
self.assertEqual(output_dict['__global'], self.local.out_path)
|
||||||
|
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_base_path)
|
||||||
|
self.assertEqual(output_dict['__type'], cdist_type.absolute_path)
|
||||||
|
self.assertEqual(output_dict['__object'], cdist_object.absolute_path)
|
||||||
|
self.assertEqual(output_dict['__object_id'], cdist_object.object_id)
|
||||||
|
self.assertEqual(output_dict['__object_fq'], cdist_object.path)
|
||||||
|
|
Loading…
Reference in a new issue