Add files conf subdirectory for static files.

This commit is contained in:
Darko Poljak 2016-06-11 12:02:13 +02:00
commit 0049b62cca
9 changed files with 26 additions and 1 deletions

View file

@ -82,6 +82,7 @@ class CodeTestCase(test.CdistTestCase):
self.assertEqual(output_dict['__object'], self.cdist_object.absolute_path)
self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id)
self.assertEqual(output_dict['__object_name'], self.cdist_object.name)
self.assertEqual(output_dict['__files'], self.local.files_path)
def test_run_gencode_remote_environment(self):
output_string = self.code.run_gencode_remote(self.cdist_object)
@ -97,6 +98,7 @@ class CodeTestCase(test.CdistTestCase):
self.assertEqual(output_dict['__object'], self.cdist_object.absolute_path)
self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id)
self.assertEqual(output_dict['__object_name'], self.cdist_object.name)
self.assertEqual(output_dict['__files'], self.local.files_path)
def test_transfer_code_remote(self):
self.cdist_object.code_remote = self.code.run_gencode_remote(self.cdist_object)
@ -112,3 +114,7 @@ class CodeTestCase(test.CdistTestCase):
self.cdist_object.code_remote = self.code.run_gencode_remote(self.cdist_object)
self.code.transfer_code_remote(self.cdist_object)
self.code.run_code_remote(self.cdist_object)
if __name__ == '__main__':
import unittest
unittest.main()

View file

@ -6,3 +6,4 @@ echo "echo __type: $__type"
echo "echo __object: $__object"
echo "echo __object_id: $__object_id"
echo "echo __object_name: $__object_name"
echo "echo __files: $__files"

View file

@ -81,6 +81,7 @@ class ManifestTestCase(test.CdistTestCase):
self.assertEqual(output_dict['__global'], self.local.base_path)
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path)
self.assertEqual(output_dict['__manifest'], self.local.manifest_path)
self.assertEqual(output_dict['__files'], self.local.files_path)
def test_type_manifest_environment(self):
cdist_type = core.CdistType(self.local.type_path, '__dump_environment')
@ -105,6 +106,7 @@ class ManifestTestCase(test.CdistTestCase):
self.assertEqual(output_dict['__object'], cdist_object.absolute_path)
self.assertEqual(output_dict['__object_id'], cdist_object.object_id)
self.assertEqual(output_dict['__object_name'], cdist_object.name)
self.assertEqual(output_dict['__files'], self.local.files_path)
def test_debug_env_setup(self):
current_level = self.log.getEffectiveLevel()
@ -112,3 +114,8 @@ class ManifestTestCase(test.CdistTestCase):
manifest = cdist.core.manifest.Manifest(self.target_host, self.local)
self.assertTrue("__cdist_debug" in manifest.env)
self.log.setLevel(current_level)
if __name__ == '__main__':
import unittest
unittest.main()

View file

@ -6,4 +6,5 @@ __target_host: $__target_host
__global: $__global
__cdist_type_base_path: $__cdist_type_base_path
__manifest: $__manifest
__files: $__files
DONE

View file

@ -10,4 +10,5 @@ __self: $__self
__object: $__object
__object_id: $__object_id
__object_name: $__object_name
__files: $__files
DONE