From bb6795b17251dc2a46f60b4b1a706b9e7c591d7f Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Sat, 4 Feb 2023 10:20:44 +0100 Subject: [PATCH] Fix new ignore feature --- apollo/publishing_tools/apollo_tree.py | 1 + apollo/tests/publishing_tools/test_apollo_tree.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/apollo/publishing_tools/apollo_tree.py b/apollo/publishing_tools/apollo_tree.py index 8011b5f..6f1a47a 100644 --- a/apollo/publishing_tools/apollo_tree.py +++ b/apollo/publishing_tools/apollo_tree.py @@ -127,6 +127,7 @@ async def scan_path( } if repo_name not in repos: repos[repo_name] = [] + repos[repo_name].append(repo) return repos diff --git a/apollo/tests/publishing_tools/test_apollo_tree.py b/apollo/tests/publishing_tools/test_apollo_tree.py index fa03c7f..cab92a5 100644 --- a/apollo/tests/publishing_tools/test_apollo_tree.py +++ b/apollo/tests/publishing_tools/test_apollo_tree.py @@ -35,6 +35,7 @@ async def _setup_test_baseos(directory: str): directory, "$reponame/$arch/os/repodata/repomd.xml", [], + [], ) return repos @@ -63,6 +64,7 @@ async def test_scan_path_valid_structure(): directory, "$reponame/$arch/os/repodata/repomd.xml", [], + [], ) assert "baseos" in repos @@ -127,6 +129,7 @@ async def test_scan_path_multiple_formats(): directory, "$reponame/$arch/os/repodata/repomd.xml", [], + [], ) assert "baseos" in repos @@ -159,6 +162,7 @@ async def test_scan_path_multiple_formats(): directory, "$reponame/source/tree/repodata/repomd.xml", [], + [], ) assert "baseos" in repos @@ -198,6 +202,7 @@ async def test_scan_path_valid_structure_arch_first(): directory, "$arch/$reponame/os/repodata/repomd.xml", [], + [], ) assert "baseos" in repos @@ -250,6 +255,7 @@ async def test_fetch_updateinfo_from_apollo_live(): directory, "$reponame/$arch/os/repodata/repomd.xml", [], + [], ) assert "BaseOS" in repos @@ -292,6 +298,7 @@ async def test_fetch_updateinfo_from_apollo_live_no_updateinfo(): directory, "$reponame/$arch/os/repodata/repomd.xml", [], + [], ) assert "BaseOS" in repos @@ -519,6 +526,7 @@ async def test_run_apollo_tree(mocker): True, directory, [], + [], "Rocky Linux 8 x86_64", ) @@ -567,6 +575,7 @@ async def test_run_apollo_tree_arch_in_product(mocker): True, directory, [], + [], "Rocky Linux 8 $arch", )