Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matejmatuska committed Jun 26, 2024
1 parent edf522f commit b78d5f1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ def test_consume_data(monkeypatch, raised, no_rhsm, testdata):
# do not write never into testdata inside the test !!
xfs = testdata.xfs
custom_repofiles = testdata.custom_repofiles
_exp_pkgs = {'dnf', 'dnf-command(config-manager)'}
_exp_pkgs = {'dnf', 'dnf-command(config-manager)', 'util-linux'}
_exp_files = []

def _get_pkgs(msg):
Expand Down
19 changes: 19 additions & 0 deletions repos/system_upgrade/common/actors/test_actor/actor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os # noqa: F401

from leapp.actors import Actor
from leapp.tags import ChecksPhaseTag
from leapp.libraries.stdlib import run


class TestActor(Actor):
"""
No documentation has been provided for the test_actor actor.
"""

name = 'test_actor'
consumes = ()
produces = ()
tags = (ChecksPhaseTag,)

def process(self):
run(['echo', '-e', '\\x80'], encoding='utf-8')
2 changes: 2 additions & 0 deletions repos/system_upgrade/common/actors/test_actor/files/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo -e '\x80'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
€
2 changes: 1 addition & 1 deletion repos/system_upgrade/common/libraries/rpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LeappComponents(object):
},
LeappComponents.COCKPIT: {'7': {'pkgs': ['cockpit-leapp']},
'8': {'pkgs': ['cockpit-leapp']},
'9': {'pkgs': ['']}
'9': {'pkgs': []}
},
LeappComponents.TOOLS: {'7': {'pkgs': ['snactor']},
'8': {'pkgs': ['snactor']},
Expand Down
2 changes: 1 addition & 1 deletion repos/system_upgrade/common/libraries/tests/test_rpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_get_leapp_packages(major_version, component, result, monkeypatch):
r"component nosuchcomponent is unknown, available choices are \['cockpit', 'framework', 'repository', 'tools']")
),
('nosuchversion', "framework",
(ValueError, r"major_version nosuchversion is unknown, available choices are \['7', '8']")),
(ValueError, r"major_version nosuchversion is unknown, available choices are \['7', '8', '9']")),
('nosuchversion', False,
(ValueError, r"At least one component must be specified when calling this function,"
r" available choices are \['cockpit', 'framework', 'repository', 'tools']")),
Expand Down

0 comments on commit b78d5f1

Please sign in to comment.