cur_master = ''
retries = int(self.fsmo_wait_max_time / self.fsmo_wait_sleep_time) + 1
for i in range(0, retries):
- # check if master has been transfered
+ # check if master has been transferred
res = ldb_dc.search(role_dn,
scope=SCOPE_BASE, attrs=["fSMORoleOwner"])
assert len(res) == 1, "Only one fSMORoleOwner value expected!"
print("Testing for %s role transfer from %s to %s" % (role, self.dnsname_dc1, self.dnsname_dc2))
self._net_fsmo_role_transfer(DC=self.dnsname_dc2, role=role)
- # check if the role is transfered
+ # check if the role is transferred
(res, master) = self._wait_for_role_transfer(ldb_dc=self.ldb_dc2,
role_dn=role_dn,
master=self.dsServiceName_dc2)
# dc1 gets back the role from dc2
print("Testing for %s role transfer from %s to %s" % (role, self.dnsname_dc2, self.dnsname_dc1))
self._net_fsmo_role_transfer(DC=self.dnsname_dc1, role=role)
- # check if the role is transfered
+ # check if the role is transferred
(res, master) = self._wait_for_role_transfer(ldb_dc=self.ldb_dc1,
role_dn=role_dn,
master=self.dsServiceName_dc1)
# dc1 keeps the role
print("Testing for no-op %s role transfer from %s to %s" % (role, self.dnsname_dc2, self.dnsname_dc1))
self._net_fsmo_role_transfer(DC=self.dnsname_dc1, role=role, noop=True)
- # check if the role is transfered
+ # check if the role is transferred
(res, master) = self._wait_for_role_transfer(ldb_dc=self.ldb_dc1,
role_dn=role_dn,
master=self.dsServiceName_dc1)
res2 = self.ldb_dc2.search(base="<GUID=%s>" % src_guid,
scope=SCOPE_BASE, attrs=["managedBy"])
- # check the object has only have one occurence of the single-valued
+ # check the object has only have one occurrence of the single-valued
# attribute and it matches on both DCs
self.assert_attrs_match(res1, res2, "managedBy", 1)
res2 = self.ldb_dc2.search(base="<GUID=%s>" % src_guid,
scope=SCOPE_BASE, attrs=["managedBy"])
- # check the object has only have one occurence of the single-valued
+ # check the object has only have one occurrence of the single-valued
# attribute and it matches on both DCs
self.assert_attrs_match(res1, res2, "managedBy", 1)
res2 = self.ldb_dc2.search(base="<GUID=%s>" % src_guid,
scope=SCOPE_BASE, attrs=["managedBy"])
- # check the object has only have one occurence of the single-valued
+ # check the object has only have one occurrence of the single-valued
# attribute and it matches on both DCs
self.assert_attrs_match(res1, res2, "managedBy", 1)
res2 = self.ldb_dc2.search(base="<GUID=%s>" % src_guid,
scope=SCOPE_BASE, attrs=["managedBy"])
- # check the object has only have one occurence of the single-valued
+ # check the object has only have one occurrence of the single-valued
# attribute and it matches on both DCs
self.assert_attrs_match(res1, res2, "managedBy", 1)
self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True)
def test_ReplicateAddInConflictOU_time(self):
- """Verifies how an object is replicated between two DCs, when created in an ambigious location
+ """Verifies how an object is replicated between two DCs, when created in an ambiguous location
This test should verify that:
- Without replication, two conflicting objects can be created
- force the conflict resolution algorithm so we know which copy will win
# object something to be under on both DCs.
# We sleep between the two adds so that DC1 adds second, and
- # so wins the conflict resoution due to a later creation time
+ # so wins the conflict resolution due to a later creation time
# (modification timestamp on the name attribute).
self.ldb_dc2.add(self.ou2)
time.sleep(1)
new_dn.add_base(self.ou2_dn)
self.ldb_dc1.rename(user_dn, new_dn)
- # Now that we have renamed the user (and so bumpted the
+ # Now that we have renamed the user (and so bumped the
# usnChanged), bump the value on the OUs.
msg = ldb.Message()
msg.dn = self.ou2_dn
self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, forced=True)
def test_ReplicateAddInConflictOU2(self):
- """Verifies how an object is replicated between two DCs, when created in an ambigious location
+ """Verifies how an object is replicated between two DCs, when created in an ambiguous location
This test should verify that:
- Without replication, two conflicting objects can be created
- force the conflict resolution algorithm so we know which copy will win
new_dn.add_base(self.ou2_dn)
self.ldb_dc1.rename(user_dn, new_dn)
- # Now that we have renamed the user (and so bumpted the
+ # Now that we have renamed the user (and so bumped the
# usnChanged), bump the value on the OUs.
msg = ldb.Message()
msg.dn = self.ou2_dn
if list_1[i].attid in changed_attributes:
# We do the changes too quickly, so unless we put sleeps
- # inbetween calls, these remain the same. Checking the USNs
+ # in between calls, these remain the same. Checking the USNs
# is enough.
pass
#self.assertTrue(list_1[i].originating_change_time < list_2[i].originating_change_time)
self._check_object(a_dn)
def test_attribute_on_ou(self):
- """Simple test having an OU with a custome attribute replicated correctly
+ """Simple test having an OU with a custom attribute replicated correctly
This ensures that the server
"""
self.sd_utils_dc1.get_sd_as_sddl(sub3_ou_dn))
# Rename new_ou (l2) to under self.ou (this must happen second). If the
- # inheritence between l3 and l4 is name-based, this could
+ # inheritance between l3 and l4 is name-based, this could
# break.
# The tree is now self.ou -> l2 -> l3 -> l4
self._net_drs_replicate(DC=self.dnsname_dc1, fromDC=self.dnsname_dc2, forced=False)
def test_ReplDisabled(self):
- """Tests we cann't replicate when replication is disabled"""
+ """Tests we can't replicate when replication is disabled"""
self._disable_inbound_repl(self.dnsname_dc1)
ccache_name = self.get_creds_ccache_name()
self.assertCmdSuccess(result, out, err)
def test_offline_manual_seized_ridalloc_with_dbcheck(self):
- """Peform the same actions as test_offline_samba_tool_seized_ridalloc,
+ """Perform the same actions as test_offline_samba_tool_seized_ridalloc,
but do not create the RID set. Confirm that dbcheck correctly creates
the RID Set.
shutil.rmtree(targetdir, ignore_errors=True)
def test_offline_manual_seized_ridalloc_add_user(self):
- """Peform the same actions as test_offline_samba_tool_seized_ridalloc,
+ """Perform the same actions as test_offline_samba_tool_seized_ridalloc,
but do not create the RID set. Confirm that user-add correctly creates
the RID Set."""
fsmo_dn = ldb.Dn(self.ldb_dc1, "CN=RID Manager$,CN=System," + self.ldb_dc1.domain_dn())
shutil.rmtree(targetdir, ignore_errors=True)
def test_offline_manual_seized_ridalloc_add_user_as_admin(self):
- """Peform the same actions as test_offline_samba_tool_seized_ridalloc,
+ """Perform the same actions as test_offline_samba_tool_seized_ridalloc,
but do not create the RID set. Confirm that user-add correctly creates
the RID Set."""
fsmo_dn = ldb.Dn(self.ldb_dc1, "CN=RID Manager$,CN=System," + self.ldb_dc1.domain_dn())