diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2015-09-17 11:35:55 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-12-24 04:09:29 +0100 |
commit | f26b227041e90b48c3ad659b461b82fed4fe0bfe (patch) | |
tree | 8a4f752c91dd12dd3a10e4136365fd127908dfaa /source4 | |
parent | fa2c6685c933e44bd504ff98200dc21d3167285a (diff) | |
download | samba-f26b227041e90b48c3ad659b461b82fed4fe0bfe.tar.gz |
dsdb.tests.sites: merge interdependent tests
The delete test deleted the site made by the create test, which worked
because "delete" sorts after "create" alphabetically. By themselves,
"delete" would fail and "create" would neglect its duty to clean up.
This would be an issue if the order of tests changes, if one of the
tests is not run, or if another test appears in between. Everything is
fine if they give up the pretense of independence.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/dsdb/tests/python/sites.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source4/dsdb/tests/python/sites.py b/source4/dsdb/tests/python/sites.py index 402d676ae1a..4fff77e5c27 100755 --- a/source4/dsdb/tests/python/sites.py +++ b/source4/dsdb/tests/python/sites.py @@ -81,8 +81,8 @@ class SitesBaseTests(samba.tests.TestCase): #tests on sites class SimpleSitesTests(SitesBaseTests): - def test_create(self): - """test creation of 1 site""" + def test_create_and_delete(self): + """test creation and deletion of 1 site""" self.ldb_admin.transaction_start() ok = sites.create_site(self.ldb_admin, self.ldb_admin.get_config_basedn(), @@ -93,9 +93,6 @@ class SimpleSitesTests(SitesBaseTests): sites.create_site, self.ldb_admin, self.ldb_admin.get_config_basedn(), "testsamba") - def test_delete(self): - """test removal of 1 site""" - self.ldb_admin.transaction_start() ok = sites.delete_site(self.ldb_admin, self.ldb_admin.get_config_basedn(), "testsamba") |