diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-09 17:42:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-09 18:25:34 +0100 |
| commit | 7622becfef4e9a83f8745ddab5bea94a6daa4a4b (patch) | |
| tree | ecd3cda290402b94252ef8c838b227610f18af33 | |
| parent | d5c507688927c7f38cc634e25caa33dbc769828c (diff) | |
| download | poky-7622becfef4e9a83f8745ddab5bea94a6daa4a4b.tar.gz | |
bitbake: toaster/tests/functional: Fix hardcoded database ID
Using a hardcoded database ID for a recipe is a bad idea and causes tests
to fail when we change data/versions.
Remove magic numbers.
(Bitbake rev: 6e3a958666ae4821cfa1d43c064a2294e6881638)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/toaster/tests/functional/test_project_page.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/tests/functional/test_project_page.py b/bitbake/lib/toaster/tests/functional/test_project_page.py index 6b6d45eaba..8b34658418 100644 --- a/bitbake/lib/toaster/tests/functional/test_project_page.py +++ b/bitbake/lib/toaster/tests/functional/test_project_page.py | |||
| @@ -774,7 +774,12 @@ class TestProjectPage(SeleniumFunctionalTestCase): | |||
| 774 | - Check recipe: name, summary, description, Version, Section, | 774 | - Check recipe: name, summary, description, Version, Section, |
| 775 | License, Approx. packages included, Approx. size, Recipe file | 775 | License, Approx. packages included, Approx. size, Recipe file |
| 776 | """ | 776 | """ |
| 777 | url = reverse("recipedetails", args=(TestProjectPage.project_id, 53428)) | 777 | # Use a recipe which is likely to exist in the layer index but not enabled |
| 778 | # in poky out the box - xen-image-minimal from meta-virtualization | ||
| 779 | self._navigate_to_project_page() | ||
| 780 | prj = Project.objects.get(pk=TestProjectPage.project_id) | ||
| 781 | recipe_id = prj.get_all_compatible_recipes().get(name="xen-image-minimal").pk | ||
| 782 | url = reverse("recipedetails", args=(TestProjectPage.project_id, recipe_id)) | ||
| 778 | self.get(url) | 783 | self.get(url) |
| 779 | self.wait_until_visible('.page-header') | 784 | self.wait_until_visible('.page-header') |
| 780 | # check title is displayed | 785 | # check title is displayed |
