diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2014-11-01 21:22:59 -0700 |
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2014-11-24 10:46:05 +0100 |
| commit | 98b5380af65ea1ec760d00187355384de0757b04 (patch) | |
| tree | 091549c834e3ee21ad692ae16ade8a0d35c2d570 /source4/dsdb/tests/python | |
| parent | 2c67d55614668583dc6290c6db86d5229fb654ea (diff) | |
| download | samba-98b5380af65ea1ec760d00187355384de0757b04.tar.gz samba-98b5380af65ea1ec760d00187355384de0757b04.tar.xz samba-98b5380af65ea1ec760d00187355384de0757b04.zip | |
Use samba.tests.subunitrun in urgent replication test.
Change-Id: I3e7a32876d557ac376326ab75e851298e874d584
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/tests/python')
| -rwxr-xr-x | source4/dsdb/tests/python/urgent_replication.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py index 8083ce42a1..19176c18c8 100755 --- a/source4/dsdb/tests/python/urgent_replication.py +++ b/source4/dsdb/tests/python/urgent_replication.py @@ -5,8 +5,7 @@ import optparse import sys sys.path.insert(0, "bin/python") import samba -samba.ensure_external_module("testtools", "testtools") -samba.ensure_external_module("subunit", "subunit/python") +from samba.tests.subunitrun import TestProgram, SubunitOptions from ldb import (LdbError, ERR_NO_SUCH_OBJECT, Message, MessageElement, Dn, FLAG_MOD_REPLACE) @@ -14,10 +13,6 @@ import samba.tests import samba.dsdb as dsdb import samba.getopt as options -from subunit.run import SubunitTestRunner - -import unittest - parser = optparse.OptionParser("urgent_replication.py [options] <host>") sambaopts = options.SambaOptions(parser) parser.add_option_group(sambaopts) @@ -26,6 +21,8 @@ parser.add_option_group(options.VersionOptions(parser)) # use command line creds if available credopts = options.CredentialsOptions(parser) parser.add_option_group(credopts) +subunitopts = SubunitOptions(parser) +parser.add_option_group(subunitopts) opts, args = parser.parse_args() if len(args) < 1: @@ -342,10 +339,4 @@ rIDAvailablePool: 133001-1073741823""", ["relax:0"]) self.assertNotEquals(res["uSNHighest"], res["uSNUrgent"]) -runner = SubunitTestRunner() -rc = 0 -# -if not runner.run(unittest.makeSuite(UrgentReplicationTests)).wasSuccessful(): - rc = 1 - -sys.exit(rc) +TestProgram(module=__name__, opts=subunitopts) |
