Esempio n. 1
0
 def test_build_descriptor_reference_subprojects(self):
     layer2_entry = SubprojectEntry('Layer2', 'Layer2', 'Resource', 'ansible-rm')
     layer1_entry = SubprojectEntry('Layer1', 'Layer1', 'Assembly', None, [layer2_entry])
     root = RootProjectConfig('2.0', 'root', '1.0', 'Assembly', None, [layer1_entry])
     layer1_config = SubprojectConfig(root, layer1_entry)
     layer2_config = SubprojectConfig(layer1_config, layer2_entry)
     references = ConfigReferences(root)
     self.assertEqual(references.build_descriptor_reference(layer1_config), '$lmctl:/contains:/Layer1:/descriptor_name')
     self.assertEqual(references.build_descriptor_reference(layer2_config), '$lmctl:/contains:/Layer1:/contains:/Layer2:/descriptor_name')
Esempio n. 2
0
 def test_build_descriptor_reference_root(self):
     root = RootProjectConfig('2.0', 'root', '1.0', 'Assembly', None, [])
     references = ConfigReferences(root)
     self.assertEqual(references.build_descriptor_reference(root), '$lmctl:/descriptor_name')