From 90645743bad9dc07542052611b2d578ff27a3b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pl=C3=ADchal?= Date: Fri, 1 Nov 2024 10:39:27 +0100 Subject: [PATCH] Adjust tests to the latest fedora container image (#3337) The default Fedora container image has been updated to `fedora:41` which uses `dnf5`. Modify tests which are checking for the `dnf` output. Require python3 which is not included in the container image. Fix a minor typo. --- tests/execute/framework/test.sh | 2 +- tests/execute/tty/data/plan.fmf | 3 +++ tests/try/basic/test.sh | 3 +-- tmt/steps/prepare/__init__.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/execute/framework/test.sh b/tests/execute/framework/test.sh index 685c610095..aeb3d205a5 100755 --- a/tests/execute/framework/test.sh +++ b/tests/execute/framework/test.sh @@ -14,7 +14,7 @@ rlJournalStart rlAssertGrep "Execute '/tests/shell/explicit' as a 'shell' test." $rlRun_LOG rlAssertGrep "Execute '/tests/beakerlib' as a 'beakerlib' test." $rlRun_LOG # Beakerlib dependency should be detected from framework - rlAssertGrep "dnf install.*beakerlib" $rlRun_LOG + rlAssertGrep "dnf.* install.*beakerlib" $rlRun_LOG rlPhaseEnd rlPhaseStartCleanup diff --git a/tests/execute/tty/data/plan.fmf b/tests/execute/tty/data/plan.fmf index 3efb09889d..4df4020ec1 100644 --- a/tests/execute/tty/data/plan.fmf +++ b/tests/execute/tty/data/plan.fmf @@ -9,6 +9,9 @@ environment: # Exercise prepare and finish as well. We use the very same commands, # just in different steps. prepare: + - how: install + package: python3 + - how: shell script: STEP=prepare ./shell.sh diff --git a/tests/try/basic/test.sh b/tests/try/basic/test.sh index 6adc35c87d..3393649775 100755 --- a/tests/try/basic/test.sh +++ b/tests/try/basic/test.sh @@ -37,8 +37,7 @@ rlJournalStart rlPhaseStartTest "Install" rlRun -s "./install.exp" rlAssertGrep "Let's try.*/plans/basic" $rlRun_LOG - rlAssertGrep "cmd: rpm -q --whatprovides tree || dnf install -y tree" $rlRun_LOG - rlAssertGrep "out: Installed:" $rlRun_LOG + rlAssertGrep "cmd: rpm -q --whatprovides tree || dnf.* install -y tree" $rlRun_LOG rlAssertGrep "Run .* successfully finished. Bye for now!" $rlRun_LOG rlPhaseEnd diff --git a/tmt/steps/prepare/__init__.py b/tmt/steps/prepare/__init__.py index 3a82b8c278..7360ed5b34 100644 --- a/tmt/steps/prepare/__init__.py +++ b/tmt/steps/prepare/__init__.py @@ -107,7 +107,7 @@ def go( # guests. For example, a test running on the "server" guest might # require package `foo` while the test running on the "client" might # require package `bar`, and `foo` and `bar` cannot be installed at the -# sametime. +# same time. @dataclasses.dataclass