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