Skip to content
Snippets Groups Projects
Commit e8683726 authored by erl-odoo's avatar erl-odoo
Browse files

[IMP] core: ease testing upgrade scripts in custom modules


Upgrade (aka migration) scripts are a core part of Odoo, allowing
database manipulations for modules during version changes.

Any module, including custom ones can run upgrade scripts, even if the
`--upgrade-path` flag (and with it, the `odoo.upgrade` sub-module) is
not present. Currently only the "standard" modules benefit of easy
upgrade script testing. Any custom modules that want to run tests of
their upgrades have to import the tests in the usual `tests` folder,
which is not ideal.

Therefore, to allow TDD and programmatic testing of upgrade scripts in
custom modules, the test discovery is here modified to also parse the
module's `migrations` and `upgrades` sub-modules for tests.

closes odoo/odoo#136130

X-original-commit: 483cc20b
Signed-off-by: default avatarChristophe Simonis (chs) <chs@odoo.com>
Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
parent bba39fa8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment