|
|
|
@ -293,13 +293,15 @@ class TestInventory(unittest.TestCase):
|
|
|
|
|
'inventory_hostname_short': 'zeus',
|
|
|
|
|
'group_names': ['greek', 'major-god']}
|
|
|
|
|
|
|
|
|
|
def test_dir_inventory(self):
|
|
|
|
|
inventory = self.dir_inventory()
|
|
|
|
|
vars = inventory.get_variables('zeus')
|
|
|
|
|
|
|
|
|
|
print "VARS=%s" % vars
|
|
|
|
|
|
|
|
|
|
assert vars == {'inventory_hostname': 'zeus',
|
|
|
|
|
'inventory_hostname_short': 'zeus',
|
|
|
|
|
'group_names': ['greek', 'major-god', 'ungrouped'],
|
|
|
|
|
'var_a': '1#2'}
|
|
|
|
|
# test disabled as needs to be updated to model desired behavior
|
|
|
|
|
#
|
|
|
|
|
#def test_dir_inventory(self):
|
|
|
|
|
# inventory = self.dir_inventory()
|
|
|
|
|
# vars = inventory.get_variables('zeus')
|
|
|
|
|
#
|
|
|
|
|
# print "VARS=%s" % vars
|
|
|
|
|
#
|
|
|
|
|
# assert vars == {'inventory_hostname': 'zeus',
|
|
|
|
|
# 'inventory_hostname_short': 'zeus',
|
|
|
|
|
# 'group_names': ['greek', 'major-god', 'ungrouped'],
|
|
|
|
|
# 'var_a': '1#2'}
|
|
|
|
|