Skip to content

Commit

Permalink
Fix repo sanity check tests with dnf5
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Verga <[email protected]>
  • Loading branch information
mattiaverga committed Jul 28, 2023
1 parent 46298a5 commit 0c36eb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bodhi-server/bodhi/server/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def sanity_check_repodata(myurl, repo_type):
tests = []

if repo_type in ('yum', 'source'):
tests.append((['list', 'available'], 'testrepo'))
tests.append((['list', '--available'], 'testrepo'))
else: # repo_type == 'module', verified above
tests.append((['module', 'list'], '.*'))

Expand Down
10 changes: 9 additions & 1 deletion bodhi-server/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,15 @@ def mkmetadatadir(path, updateinfo=None, comps=None, source=False):
</packagelist>
</group>
</comps>'''
updateinfofile = 'something<id>someID</id>something'

updateinfofile = '''<?xml version="1.0" encoding="UTF-8"?>
<updates>
<update>
<id>someID</id>
<title>something</title>
</update>
</updates>'''

if not os.path.isdir(path):
os.makedirs(path)
if not comps and not source:
Expand Down

0 comments on commit 0c36eb9

Please sign in to comment.