diff mbox series

Toaster: bug-fix on custom image test cases

Message ID 20231017204930.411529-1-alassane.yattara@savoirfairelinux.com
State New
Headers show
Series Toaster: bug-fix on custom image test cases | expand

Commit Message

Alassane Yattara Oct. 17, 2023, 8:49 p.m. UTC
To test custom image creation, a file for base_recipe should exists otherwise test fail,
User we need to build a base image first, that will create a file for base_recipe, which take a while.

To avoid test dependencies between test and run build, i create a tmp file for base recipe.

Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com>
 lib/toaster/tests/browser/test_new_custom_image_page.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series


diff --git a/lib/toaster/tests/browser/test_new_custom_image_page.py b/lib/toaster/tests/browser/test_new_custom_image_page.py
index 6361f403..34d1bd45 100644
--- a/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -48,8 +48,12 @@  class TestNewCustomImagePage(SeleniumTestCase):
         self.recipe = Recipe.objects.create(
+            file_path='/tmp/core-image-minimal.bb',
+        # create a tmp file for the recipe
+        with open(self.recipe.file_path, 'w') as f:
+            f.write('foo')
         # another project with a custom image already in it
         project2 = Project.objects.create(name='whoop', release=release)