Merge "Fix test cases expect Ubuntu specific assertion messages"

This commit is contained in:
Jenkins 2017-04-24 18:45:54 +00:00 committed by Gerrit Code Review
commit 66df51ecd5
2 changed files with 4 additions and 5 deletions

@ -86,9 +86,8 @@ class WhenTestingContainerConsumerRepository(utils.RepositoryTestCase):
self.repo.create_from,
consumer2,
session=session)
self.assertEqual(
u"A defined SQL constraint check failed: 'UNIQUE constraint "
"failed: container_consumer_metadata.data_hash',",
self.assertIn(
"SQL constraint check failed",
exception_result.message)
def test_should_raise_no_result_found_get_container_id(self):

@ -170,7 +170,7 @@ class WhenTestingSecretStoresRepo(database_utils.RepositoryTestCase):
self._create_secret_store(name, store_plugin, crypto_plugin, False)
self.assertFail()
except exception.ConstraintCheck as ex:
self.assertIn("UNIQUE constraint", ex.message)
self.assertIn("SQL constraint check failed", ex.message)
class WhenTestingProjectSecretStoreRepo(database_utils.RepositoryTestCase):
@ -313,7 +313,7 @@ class WhenTestingProjectSecretStoreRepo(database_utils.RepositoryTestCase):
self._create_project_store(project1.id, s_store2.id)
self.assertFail()
except exception.ConstraintCheck as ex:
self.assertIn("UNIQUE constraint", ex.message)
self.assertIn("SQL constraint check failed", ex.message)
def test_get_secret_store_for_project(self):
project1 = self._create_project()