Fix test when running with SQLite 3.7.17 from CentOS 7
https://review.openstack.org/348943 introduced a test that fails to run in SQLite 3.7.17, because the failed constraint message in that version differs from the one expected: "CHECK constraint failed" is expected, but "(sqlite3.IntegrityError) constraint failed" is received. Fixing this by setting the regexp to an error message that matches in both versions. Change-Id: I4b09eb4c3804fb9279a5acb3c1409def739e28c3
This commit is contained in:
parent
ae1ddd23db
commit
01b83595d5
@ -844,7 +844,7 @@ class TestNodeInfoState(test_base.NodeStateTest):
|
|||||||
|
|
||||||
def test_set_invalid_state(self):
|
def test_set_invalid_state(self):
|
||||||
six.assertRaisesRegex(self, oslo_db.exception.DBError,
|
six.assertRaisesRegex(self, oslo_db.exception.DBError,
|
||||||
'CHECK constraint failed',
|
'constraint failed',
|
||||||
self.node_info._set_state, 'foo')
|
self.node_info._set_state, 'foo')
|
||||||
|
|
||||||
def test_commit(self):
|
def test_commit(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user