diff mbox series

toaster: remove test and update setup to avoid rebuilding image

Message ID 20231212200515.219392-1-marlon.rodriguez-garcia@savoirfairelinux.com
State Accepted, archived
Commit 9f1ad015051d4a4b363787c4a1f2b943d55eb8cb
Headers show
Series toaster: remove test and update setup to avoid rebuilding image | expand

Commit Message

Marlon Rodriguez Garcia Dec. 12, 2023, 8:05 p.m. UTC
Update build test to fix setUp, by including the built, the system was rebuilding 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@savoirfairelinux.com>
---
 lib/toaster/tests/builds/test_core_image_min.py | 12 ------------
 1 file changed, 12 deletions(-)
diff mbox series

Patch

diff --git a/lib/toaster/tests/builds/test_core_image_min.py b/lib/toaster/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"""
 
     def setUp(self):
-        self.built = self.build("core-image-minimal")
         self.completed_build = self.target_already_built("core-image-minimal")
 
     # Check if build name is unique - tc_id=795
@@ -47,17 +46,6 @@  class BuildCoreImageMinimal(BuildTest):
                          total_builds,
                          msg='Build cooker log path is not unique')
 
-    # Check if task order is unique for one build - tc=824
-    def test_Task_Unique_Order(self):
-        total_task_order = Task.objects.filter(
-            build=self.built).values('order').count()
-        distinct_task_order = Task.objects.filter(
-            build=self.completed_build).values('order').distinct().count()
-
-        self.assertNotEqual(total_task_order,
-                         distinct_task_order,
-                         msg='Errors task order is not unique')
-
     # Check task order sequence for one build - tc=825
     def test_Task_Order_Sequence(self):
         cnt_err = []