aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-10-17 09:50:41 +1300
committerDouglas Bagnall <dbagnall@samba.org>2018-10-18 10:04:02 +0200
commit204bd0e447b5a83f603eac9dd317bdb026539cbc (patch)
treedea4cdb384dbb91de32524d1a4bd3fedae424d08
parente404b6aaf51015f43e1a1f8434c42bcbbe05efdb (diff)
downloadsamba-204bd0e447b5a83f603eac9dd317bdb026539cbc.tar.gz
samba-204bd0e447b5a83f603eac9dd317bdb026539cbc.tar.xz
samba-204bd0e447b5a83f603eac9dd317bdb026539cbc.zip
py3/tests/kcc: turn error into failure for flapping.d/kcc
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--python/samba/tests/kcc/__init__.py5
-rw-r--r--selftest/flapping.d/kcc_verify_py32
2 files changed, 5 insertions, 2 deletions
diff --git a/python/samba/tests/kcc/__init__.py b/python/samba/tests/kcc/__init__.py
index 39167824d35..a8b50709d1b 100644
--- a/python/samba/tests/kcc/__init__.py
+++ b/python/samba/tests/kcc/__init__.py
@@ -62,7 +62,10 @@ class KCCTests(samba.tests.TestCase):
my_kcc = kcc.KCC(unix_now, False, False, False, False)
my_kcc.load_samdb("ldap://%s" % os.environ["SERVER"],
self.lp, self.creds)
- dsas = my_kcc.list_dsas()
+ try:
+ dsas = my_kcc.list_dsas()
+ except kcc.KCCError as e:
+ self.fail("kcc.list_dsas failed with %s" % e)
env = os.environ['TEST_ENV']
for expected_dsa in ENV_DSAS[env]:
self.assertIn(expected_dsa, dsas)
diff --git a/selftest/flapping.d/kcc_verify_py3 b/selftest/flapping.d/kcc_verify_py3
index 03005fca933..e96ce18ef8d 100644
--- a/selftest/flapping.d/kcc_verify_py3
+++ b/selftest/flapping.d/kcc_verify_py3
@@ -1 +1 @@
-samba.tests.kcc.python3.samba.tests.kcc.KCCTests.test_verify
+samba.tests.kcc.python3.samba.tests.kcc.KCCTests