diff 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
line wrap: on
line diff
--- a/test/db_test_base.py	Wed Mar 01 13:04:54 2023 -0500
+++ b/test/db_test_base.py	Thu Mar 02 17:01:39 2023 -0500
@@ -290,6 +290,8 @@
             # test upgrade adding index
             self.db.post_init()
 
+            self.assertEqual(self.db.db_version_updated, True)
+
             # they're back
             self.db.sql('show indexes from _user;')
             self.assertEqual(5,len(self.db.cursor.fetchall()))

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