From ef72f58db90f61bdbfe8696bbc08f832916b8230 Mon Sep 17 00:00:00 2001 From: Ales Nezbeda Date: Mon, 26 Aug 2024 14:37:46 +0200 Subject: [PATCH] Fix dnf5 tests running outside fedora Match dnf3 and dnf5 tests together. Change `recommends` to `require` for dnf5, because it doesn't make sense to even start the test if dnf5 is not present. --- basic/sqlite3-dnf5/main.fmf | 21 ++++++++++++++------- basic/sqlite3-dnf5/runtest.sh | 15 ++++++--------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/basic/sqlite3-dnf5/main.fmf b/basic/sqlite3-dnf5/main.fmf index 2944927..014e24e 100644 --- a/basic/sqlite3-dnf5/main.fmf +++ b/basic/sqlite3-dnf5/main.fmf @@ -1,15 +1,22 @@ summary: Sanity test for sqlite database and dnf5 description: '' -contact: Zuzana Miklankova +contact: Ales Nezbeda component: -- sqlite + - sqlite path: /basic/sqlite3-dnf5 framework: beakerlib -recommend: -- sqlite -- dnf5 +require: + - sqlite + - dnf5 duration: 5m enabled: true +adjust: + - enabled: false + when: distro <= rhel-10 + because: DNF 5 is not present in RHEL 10 and older repos. + - enabled: false + when: distro <= centos-stream-10 + because: DNF 5 is not present in CentOS Stream 10 and older repos. tag: -- Tier1 -- sqlite + - Tier1 + - sqlite diff --git a/basic/sqlite3-dnf5/runtest.sh b/basic/sqlite3-dnf5/runtest.sh index 5feace7..709ab2a 100755 --- a/basic/sqlite3-dnf5/runtest.sh +++ b/basic/sqlite3-dnf5/runtest.sh @@ -31,15 +31,12 @@ rlJournalStart rlPhaseStartTest - if [ ! -e /usr/bin/dnf5 ]; then - rlLog "dnf5 is not available, skipping" - else - rlRun "/usr/bin/dnf5 update -y" - rlRun "/usr/bin/dnf5 search sqlite" - rlRun "/usr/bin/dnf5 autoremove -y" - rlRun "/usr/bin/dnf5 info sqlite" - rlRun "/usr/bin/dnf5 history list" - fi + rlRun "/usr/bin/dnf5 update -y" + rlRun "/usr/bin/dnf5 search sqlite" + rlRun "/usr/bin/dnf5 autoremove -y" + rlRun "/usr/bin/dnf5 info sqlite" + rlRun "/usr/bin/dnf5 check" + rlRun "/usr/bin/dnf5 history list" rlPhaseEnd rlJournalEnd rlJournalPrintText