Add basic migration tests for postgresql
This adds two test files: * `test_postgresql_migrated.py` applies an old schema definition, runs the migrations, then runs all the usual tests * `test_postgresql_migration.py` applies an old schema definition, inserts data, runs the migrations, and checks the data is still available `test_postgresql_migration.py` will probably break in some releases as it uses the old SQL with the new Python to insert, but it should be good enough, and we can disable it in some releases when needed.
Showing
- swh/storage/tests/data/sql-v0.18.0/10-superuser-init.sql 27 additions, 0 deletionsswh/storage/tests/data/sql-v0.18.0/10-superuser-init.sql
- swh/storage/tests/data/sql-v0.18.0/15-flavor.sql 22 additions, 0 deletionsswh/storage/tests/data/sql-v0.18.0/15-flavor.sql
- swh/storage/tests/data/sql-v0.18.0/20-enums.sql 23 additions, 0 deletionsswh/storage/tests/data/sql-v0.18.0/20-enums.sql
- swh/storage/tests/data/sql-v0.18.0/30-schema.sql 499 additions, 0 deletionsswh/storage/tests/data/sql-v0.18.0/30-schema.sql
- swh/storage/tests/data/sql-v0.18.0/40-funcs.sql 960 additions, 0 deletionsswh/storage/tests/data/sql-v0.18.0/40-funcs.sql
- swh/storage/tests/data/sql-v0.18.0/60-indexes.sql 283 additions, 0 deletionsswh/storage/tests/data/sql-v0.18.0/60-indexes.sql
- swh/storage/tests/data/sql-v0.18.0/logical_replication/replication_source.sql 25 additions, 0 deletions...ta/sql-v0.18.0/logical_replication/replication_source.sql
- swh/storage/tests/test_postgresql_migrated.py 63 additions, 0 deletionsswh/storage/tests/test_postgresql_migrated.py
- swh/storage/tests/test_postgresql_migration.py 194 additions, 0 deletionsswh/storage/tests/test_postgresql_migration.py
Loading
Please register or sign in to comment