[Toaster] [PATCH 0/5] mysql migrations and unittests fixes
Michael Wood
michael.g.wood at intel.com
Tue Feb 16 11:19:52 PST 2016
This series contains a clean up of the database migrations to fix the issue that was preventing Toaster from starting up when using mysql backend.
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=9116
After fixing these migrations and getting Toaster to start up properly using mysql backend a number of unittests failed due to differences in testing on sqlite.
To remove these differences I've changed the data that was in the setUp to be more agnostic and added .lower() where needed to make sure the orderby re-ordering in the same way. I also took this opportunitiy to convert the toastergui unit tests to use a django fixture making it easier to load the database state for testing.
Bugs fixed discovered by fixing the unit tests are:
- toaster: SoftwareRecipesTable apply default order_by
- toaster: toastergui Fix invalid char test and implementation
and one already reported
- toaster: PackagesTable show only installed packages
[note files deleted and added in this series]
Michael Wood (5):
toaster: orm migrations Sort out migrations mess
toaster: SoftwareRecipesTable apply default order_by
toaster: toastergui unit tests convert to use fixtures
toaster: PackagesTable show only installed packages
toaster: toastergui Fix invalid char test and implementation
bitbake/lib/toaster/orm/migrations/0001_initial.py | 26 --
.../orm/migrations/0002_auto_20151210_1209.py | 41 --
.../orm/migrations/0002_auto_20151223_1528.py | 27 --
.../orm/migrations/0002_customimagerecipe.py | 24 ++
.../orm/migrations/0003_customimagepackage.py | 2 +-
bitbake/lib/toaster/orm/migrations/0004_merge.py | 15 -
.../lib/toaster/orm/migrations/0004_provides.py | 27 ++
.../orm/migrations/0005_auto_20160118_1055.py | 19 -
.../0006_customimagerecipe_last_updated.py | 19 -
.../fixtures/toastergui-unittest-data.xml | 446 +++++++++++++++++++++
bitbake/lib/toaster/toastergui/tables.py | 5 +-
bitbake/lib/toaster/toastergui/tests.py | 257 ++----------
bitbake/lib/toaster/toastergui/views.py | 7 +-
13 files changed, 550 insertions(+), 365 deletions(-)
delete mode 100644 bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py
delete mode 100644 bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py
create mode 100644 bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
delete mode 100644 bitbake/lib/toaster/orm/migrations/0004_merge.py
create mode 100644 bitbake/lib/toaster/orm/migrations/0004_provides.py
delete mode 100644 bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py
delete mode 100644 bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py
create mode 100644 bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
--
2.5.0
More information about the toaster
mailing list