Mercurial > p > roundup > code
diff test/test_postgresql.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 | 9ff091537f43 |
| children | 3071db43bfb6 |
line wrap: on
line diff
--- a/test/test_postgresql.py Wed Mar 01 13:04:54 2023 -0500 +++ b/test/test_postgresql.py Thu Mar 02 17:01:39 2023 -0500 @@ -143,6 +143,8 @@ # test upgrade path self.db.post_init() + self.assertEqual(self.db.db_version_updated, True) + # This insert with text of expected column size should succeed self.db.sql("insert into __words VALUES('%s',1)" % long_string) @@ -204,6 +206,8 @@ # test upgrade altering row self.db.post_init() + self.assertEqual(self.db.db_version_updated, True) + # verify they keep all signifcant digits before the decimal point for tablename in ['otk', 'session']: self.db.sql(
