Fix new ignore feature

This commit is contained in:
Mustafa Gezen 2023-02-04 10:20:44 +01:00
parent bb0d22c63c
commit bb6795b172
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
2 changed files with 10 additions and 0 deletions

View File

@ -127,6 +127,7 @@ async def scan_path(
} }
if repo_name not in repos: if repo_name not in repos:
repos[repo_name] = [] repos[repo_name] = []
repos[repo_name].append(repo)
return repos return repos

View File

@ -35,6 +35,7 @@ async def _setup_test_baseos(directory: str):
directory, directory,
"$reponame/$arch/os/repodata/repomd.xml", "$reponame/$arch/os/repodata/repomd.xml",
[], [],
[],
) )
return repos return repos
@ -63,6 +64,7 @@ async def test_scan_path_valid_structure():
directory, directory,
"$reponame/$arch/os/repodata/repomd.xml", "$reponame/$arch/os/repodata/repomd.xml",
[], [],
[],
) )
assert "baseos" in repos assert "baseos" in repos
@ -127,6 +129,7 @@ async def test_scan_path_multiple_formats():
directory, directory,
"$reponame/$arch/os/repodata/repomd.xml", "$reponame/$arch/os/repodata/repomd.xml",
[], [],
[],
) )
assert "baseos" in repos assert "baseos" in repos
@ -159,6 +162,7 @@ async def test_scan_path_multiple_formats():
directory, directory,
"$reponame/source/tree/repodata/repomd.xml", "$reponame/source/tree/repodata/repomd.xml",
[], [],
[],
) )
assert "baseos" in repos assert "baseos" in repos
@ -198,6 +202,7 @@ async def test_scan_path_valid_structure_arch_first():
directory, directory,
"$arch/$reponame/os/repodata/repomd.xml", "$arch/$reponame/os/repodata/repomd.xml",
[], [],
[],
) )
assert "baseos" in repos assert "baseos" in repos
@ -250,6 +255,7 @@ async def test_fetch_updateinfo_from_apollo_live():
directory, directory,
"$reponame/$arch/os/repodata/repomd.xml", "$reponame/$arch/os/repodata/repomd.xml",
[], [],
[],
) )
assert "BaseOS" in repos assert "BaseOS" in repos
@ -292,6 +298,7 @@ async def test_fetch_updateinfo_from_apollo_live_no_updateinfo():
directory, directory,
"$reponame/$arch/os/repodata/repomd.xml", "$reponame/$arch/os/repodata/repomd.xml",
[], [],
[],
) )
assert "BaseOS" in repos assert "BaseOS" in repos
@ -519,6 +526,7 @@ async def test_run_apollo_tree(mocker):
True, True,
directory, directory,
[], [],
[],
"Rocky Linux 8 x86_64", "Rocky Linux 8 x86_64",
) )
@ -567,6 +575,7 @@ async def test_run_apollo_tree_arch_in_product(mocker):
True, True,
directory, directory,
[], [],
[],
"Rocky Linux 8 $arch", "Rocky Linux 8 $arch",
) )