From: Douglas Bagnall Date: Tue, 16 Oct 2018 20:50:41 +0000 (+1300) Subject: py3/tests/kcc: turn error into failure for flapping.d/kcc X-Git-Tag: tdb-1.3.17~1283 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=204bd0e447b5a83f603eac9dd317bdb026539cbc;p=thirdparty%2Fsamba.git py3/tests/kcc: turn error into failure for flapping.d/kcc Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- 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