mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add a unit test to subset limiting via a regex, and some doc in man
page.
This commit is contained in:
@@ -158,6 +158,14 @@ class TestInventory(unittest.TestCase):
|
||||
print "EXPECTED=%s" % sorted(expected_hosts)
|
||||
assert sorted(hosts) == sorted(expected_hosts)
|
||||
|
||||
def test_regex_exclude(self):
|
||||
inventory = self.complex_inventory()
|
||||
hosts = inventory.list_hosts("~rtp_[ac]")
|
||||
expected_hosts = ['rtp_a', 'rtp_c']
|
||||
print "HOSTS=%s" % sorted(hosts)
|
||||
print "EXPECTED=%s" % sorted(expected_hosts)
|
||||
assert sorted(hosts) == sorted(expected_hosts)
|
||||
|
||||
def test_complex_enumeration(self):
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user