def test_simple(self, conf): conf.require(ad_user=True) domain = conf.domain() loc = Locator() result = loc.locate_many(domain) assert len(result) > 0 result = loc.locate_many(domain, role='gc') assert len(result) > 0 result = loc.locate_many(domain, role='pdc') assert len(result) == 1
def test_network_failure(self, conf): conf.require(ad_user=True, local_admin=True, firewall=True) domain = conf.domain() loc = Locator() # Block outgoing DNS and CLDAP traffic and enable it after 3 seconds. # Locator should be able to handle this. conf.remove_network_blocks() conf.block_outgoing_traffic('tcp', 53) conf.block_outgoing_traffic('udp', 53) conf.block_outgoing_traffic('udp', 389) t = Timer(3, conf.remove_network_blocks); t.start() result = loc.locate_many(domain) assert len(result) > 0