diff --git a/.packit.yaml b/.packit.yaml index 4b3488f83..7d9180525 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -59,7 +59,7 @@ jobs: job: tests trigger: pull_request targets: - - fedora-40 + - fedora-41 # We don't want to run two test runs; so we limit this to a single package packages: - mock diff --git a/behave/features/dnf4.feature b/behave/features/dnf4.feature index 1e484d658..7a1782746 100644 --- a/behave/features/dnf4.feature +++ b/behave/features/dnf4.feature @@ -1,8 +1,24 @@ Feature: Mock is able to work with dnf4 chroots - @dnf4 + @dnf4 @no-bootstrap Scenario: Building a DNF4 chroot without bootstrap chroot Given an unique mock namespace - And mock is always executed with "--no-bootstrap-chroot" + And mock is always executed with "--no-bootstrap-chroot --config-opts=dnf_warning=False" + When an online source RPM is rebuilt against centos-stream+epel-9-x86_64 + Then the build succeeds + + @dnf4 @no-bootstrap-image + Scenario: Building in DNF4 chroot with dnf4 on host, without bootstrap image + Given an unique mock namespace + And the python3-dnf package is installed on host + And mock is always executed with "--no-bootstrap-image" + When an online source RPM is rebuilt against centos-stream+epel-9-x86_64 + Then the build succeeds + + @dnf4 @no-bootstrap-image @with-dnf4 + Scenario: Building a DNF4 chroot without dnf4 on host, without bootstrap image + Given an unique mock namespace + And the python3-dnf package not installed on host + And mock is always executed with "--no-bootstrap-image" When an online source RPM is rebuilt against centos-stream+epel-9-x86_64 Then the build succeeds diff --git a/behave/features/dnf5.feature b/behave/features/dnf5.feature index 84ee8afcd..931a6eec3 100644 --- a/behave/features/dnf5.feature +++ b/behave/features/dnf5.feature @@ -1,17 +1,15 @@ -Feature: Mock 3.6+ should be able to work with DNF5 +Feature: Mock correctly works with DNF5 - @dnf5 - Scenario: Building in Rawhide with DNF5 but DNF4 on host - Given mock is always executed with "--config-opts package_manager=dnf5" - And the dnf5 package not installed on host + @dnf5 @no-bootstrap + Scenario: Building in Rawhide with DNF5, without bootstrap chroot + Given mock is always executed with "--no-bootstrap-chroot" And an unique mock namespace When an online source RPM is rebuilt Then the build succeeds - @dnf5 + @dnf5 @no-bootstrap-image Scenario: Building in Rawhide with DNF5 with DNF5 on host - Given mock is always executed with "--config-opts package_manager=dnf5" - And the dnf5 package is installed on host + Given mock is always executed with "--no-bootstrap-image" And an unique mock namespace When an online source RPM is rebuilt Then the build succeeds diff --git a/behave/steps/other.py b/behave/steps/other.py index 6a420b720..61e70444f 100644 --- a/behave/steps/other.py +++ b/behave/steps/other.py @@ -41,12 +41,12 @@ def _first_int(string, max_lines=20): def add_cleanup_last_transaction(context): # DNF5 support https://github.com/rpm-software-management/dnf5/issues/140 - dnf = ["sudo", "/usr/bin/dnf-3", "-y", "history"] + dnf = ["sudo", "/usr/bin/dnf", "history"] _, out, _ = run(dnf + ["list"]) transaction_id = _first_int(out) def _revert_transaction(_context): - cmd = dnf + ["undo", transaction_id] + cmd = dnf + ["undo", transaction_id, "-y"] with no_output(): assert_that(run(cmd)[0], equal_to(0)) diff --git a/mock/integration-tests/testenvironment b/mock/integration-tests/testenvironment index a63eb51ae..ce09044ed 100644 --- a/mock/integration-tests/testenvironment +++ b/mock/integration-tests/testenvironment @@ -8,7 +8,7 @@ VERBOSE=--verbose # # most tests below will use this mock command line # -testConfig=fedora-40-x86_64 +testConfig=fedora-41-x86_64 uniqueext="$$-$RANDOM" outdir=${TOPDIR}/mock-unit-test cfgdir=${TOPDIR}/../mock-core-configs/etc/mock