comparison test/db_test_base.py @ 7206:521d98231e5c

Test self.db.db_version_updated in schema upgrade paths A user on the roundup-users mailing list reported that a 'roundup-admin migrate' reported that changes were needed. But it should have done the migration. roundup-admin uses the property db.db_version_updated to tell if there was a migration. Testing never looked at that property. Add a test for that property in all migration updates. AFAICT the test is always successful. So no bug uncovered by these tests.
author John Rouillard <rouilj@ieee.org>
date Thu, 02 Mar 2023 17:01:39 -0500
parents 2acea75cd7e5
children 978285986b2c
comparison
equal deleted inserted replaced
7205:1a3d4703c7d6 7206:521d98231e5c
287 if hasattr(self, "downgrade_only"): 287 if hasattr(self, "downgrade_only"):
288 return 288 return
289 289
290 # test upgrade adding index 290 # test upgrade adding index
291 self.db.post_init() 291 self.db.post_init()
292
293 self.assertEqual(self.db.db_version_updated, True)
292 294
293 # they're back 295 # they're back
294 self.db.sql('show indexes from _user;') 296 self.db.sql('show indexes from _user;')
295 self.assertEqual(5,len(self.db.cursor.fetchall())) 297 self.assertEqual(5,len(self.db.cursor.fetchall()))
296 298

Roundup Issue Tracker: http://roundup-tracker.org/