Skip to content

Commit

Permalink
YAML inventory unit test: add tests
Browse files Browse the repository at this point in the history
Relates: ansible#33878
  • Loading branch information
pilou- authored and bcoca committed Dec 20, 2017
1 parent 35a4fe8 commit 737920c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/units/plugins/inventory/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def test_yaml_inventory(self, filename="test.yaml"):
self.assertIn(im._inventory.get_host('test1'), im._inventory.groups['all'].hosts)
self.assertIn(im._inventory.get_host('test2'), im._inventory.groups['all'].hosts)
self.assertEqual(len(im._inventory.groups['all'].hosts), 2)
self.assertIn(im._inventory.get_host('test1'), im._inventory.groups['ungrouped'].hosts)
self.assertIn(im._inventory.get_host('test2'), im._inventory.groups['ungrouped'].hosts)
self.assertEqual(len(im._inventory.groups['ungrouped'].hosts), 2)

def _get_inventory(self, inventory_content):

Expand Down

0 comments on commit 737920c

Please sign in to comment.