Skip to content
Snippets Groups Projects

[RFC] Add basic migration tests for postgresql

Open vlorentz requested to merge generated-differential-D5014-source into master

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.

What do you think?

Test Plan

tests fail because they don't work in tox (I'll look into later if we want to pursue this way of testing migrations)


Migrated from D5014 (view on Phabricator)

Merge request reports

Pipeline #4415 failed

Pipeline failed for 4ae7aad7 on generated-differential-D5014-source

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading