From 24b77bb6436f2f75c9555530915c2ec6be6f248a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 9 Nov 2023 01:50:06 +0900 Subject: [PATCH] Fix bindep.txt for python 3.11 job(Debian Bookworm) Python 3.11 job now run on Debian Bookwarm which does not provide some of the packages in bindep. This fixes the bindep file so that it pulls packages actually available. This also updates a few assertions of log records in unit tests to make these robust for any warning logs. Change-Id: Iae3f4da24418530b61b9a0b64390160d194da05b --- bindep.txt | 8 +++++--- keystone/tests/unit/test_v3_federation.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bindep.txt b/bindep.txt index efa6c067b1..f8ffed149b 100644 --- a/bindep.txt +++ b/bindep.txt @@ -12,11 +12,13 @@ libsqlite3-dev [platform:dpkg] libssl-dev [platform:dpkg] libxml2-dev [platform:dpkg] libxslt1-dev [platform:dpkg] -mysql-client [platform:dpkg] -mysql-server [platform:dpkg] +mysql-client [platform:dpkg !platform:debian] +mariadb-client [platform:debian] +mysql-server [platform:dpkg !platform:debian] +mariadb-server [platform:debian] postgresql-client [platform:dpkg] postgresql-server-dev-all [platform:dpkg] -python-all-dev [platform:dpkg] +python-all-dev [platform:dpkg !platform:debian] python3-all-dev [platform:dpkg] cyrus-sasl-devel [platform:rpm] diff --git a/keystone/tests/unit/test_v3_federation.py b/keystone/tests/unit/test_v3_federation.py index 4f09ea9d50..acf934c866 100644 --- a/keystone/tests/unit/test_v3_federation.py +++ b/keystone/tests/unit/test_v3_federation.py @@ -4367,7 +4367,7 @@ class SAMLGenerationTests(test_v3.RestfulTestCase): self.signed_assertion) expected_log = ( 'Error when signing assertion, reason: %s\n' % exception_msg) - self.assertEqual(expected_log, logger_fixture.output) + self.assertIn(expected_log, logger_fixture.output) def test_sign_assertion_logs_message_if_xmlsec1_is_not_installed(self): with mock.patch.object(subprocess, 'check_output') as co_mock: @@ -4383,7 +4383,7 @@ class SAMLGenerationTests(test_v3.RestfulTestCase): expected_log = ('Unable to locate xmlsec1 binary on the system. ' 'Check to make sure it is installed.\n') - self.assertEqual(expected_log, logger_fixture.output) + self.assertIn(expected_log, logger_fixture.output) class IdPMetadataGenerationTests(test_v3.RestfulTestCase):