Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 5F505E00C00; Tue, 16 Feb 2016 11:20:15 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.52 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 27070E009EA for ; Tue, 16 Feb 2016 11:20:11 -0800 (PST) Received: by mail-pa0-f52.google.com with SMTP id fy10so68640938pac.1 for ; Tue, 16 Feb 2016 11:20:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=lG76TG65Zy7Jmi+ICY7jtD4KDhN+sGGR4c10j/tUMKk=; b=wjjEalzyNeqEGY1yvo6nbSWmKY2phrPWye7/z/jognpXgTnxGl6hBfivWC12i7nXX9 z2ZIW+M81YK4P8BnDgSHIcFiaGdTzIZDWcX6wb6SmOjefM1d2WWBt/ru4mGksQcoANvF Nvh6AbxPUgamnW2sY3vBn/aWFoMx0zEgRjqg0/YORemIrG8TVEIpJWrEd17An6eq4kwp T99NYEZToLeZNURnKh1Xy6/RdrmmvwdqSnjElXwAGcnp7HqiXpkFp82sYvhXHXG1AI+D XFowjem+UuRKFQPT8NtNGDPwGJvL1+5hnIudL7A7AKj6RqCALJMNnBScJjqZ0WrS2eS/ L20Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lG76TG65Zy7Jmi+ICY7jtD4KDhN+sGGR4c10j/tUMKk=; b=YIP24URFL+xDPk5S6YdP3SnLSXcdqqbjHSF2O3PGvAT5ub3OA5ISP9r9zfSFvd+hhq 1HZL/wmv98TIUG14V79qLu6tEESzbaBcXG0NSHiqp/1WkQpF8noAQ+95DG+jHk7Nbd8S UVJl65eMslWAYwdgeuYFD8EAI+tD5c1sqt9XEdfg3O89cvu3GbzRpu3GOY2lU7IrHxQn GQAiCdnzmZ7U3o22/H6d7qeLZNhEaQw5/wPQKcrSbkkbr5LCnjkQTTkR7vCx+B9k12BS Kmjm9xjGbqpDbcQIjD46YhqT9EElLN/hBnpaOTlDo40t1P+DKQuXlb0Gn07ZpSKDNh44 0DwQ== X-Gm-Message-State: AG10YOQKnJ9OMt+q9/Z1krczFkUdEWAuPanwo0KfKPX/zvK2G+ouP+IcBT6RdN4+P4KPbWCr X-Received: by 10.66.100.129 with SMTP id ey1mr33236227pab.100.1455650411061; Tue, 16 Feb 2016 11:20:11 -0800 (PST) Received: from dorado.ger.corp.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id 85sm47551442pfl.18.2016.02.16.11.20.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 11:20:10 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 16 Feb 2016 19:19:52 +0000 Message-Id: <1455650397-14195-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.5.0 Subject: [PATCH 0/5] mysql migrations and unittests fixes X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 19:20:15 -0000 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