[PATCH] toaster: remove test and update setup to avoid rebuilding image

Marlon Rodriguez Garcia <[email protected]> Tue, 12 Dec 2023 15:05:15 -0500
Newsgroups org.yoctoproject.lists.toaster,org.openembedded.lists.bitbake-devel
Message-ID <20231212200515.219392-1-marlon.rodriguez-garcia@savoirfairelinux.com>
Update build test to fix setUp, by including the built, the system was re=
building the image on every test, causing the database to lock
Delete test for unique order, this test was the only test using the self.=
built element and breaking the system.

Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfai=
relinux.com>
---
 lib/toaster/tests/builds/test_core_image_min.py | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/lib/toaster/tests/builds/test_core_image_min.py b/lib/toaste=
r/tests/builds/test_core_image_min.py
index dc1ad9da..c5bfdbfb 100644
--- a/lib/toaster/tests/builds/test_core_image_min.py
+++ b/lib/toaster/tests/builds/test_core_image_min.py
@@ -27,7 +27,6 @@ class BuildCoreImageMinimal(BuildTest):
     """Build core-image-minimal and test the results"""
=20
     def setUp(self):
-        self.built =3D self.build("core-image-minimal")
         self.completed_build =3D self.target_already_built("core-image-m=
inimal")
=20
     # Check if build name is unique - tc_id=3D795
@@ -47,17 +46,6 @@ class BuildCoreImageMinimal(BuildTest):
                          total_builds,
                          msg=3D'Build cooker log path is not unique')
=20
-    # Check if task order is unique for one build - tc=3D824
-    def test_Task_Unique_Order(self):
-        total_task_order =3D Task.objects.filter(
-            build=3Dself.built).values('order').count()
-        distinct_task_order =3D Task.objects.filter(
-            build=3Dself.completed_build).values('order').distinct().cou=
nt()
-
-        self.assertNotEqual(total_task_order,
-                         distinct_task_order,
-                         msg=3D'Errors task order is not unique')
-
     # Check task order sequence for one build - tc=3D825
     def test_Task_Order_Sequence(self):
         cnt_err =3D []
--=20
2.34.1