Skip to content

Commit

Permalink
tests: switch from Fedora 40 to Fedora 41
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Jan 17, 2025
1 parent 8a0dc95 commit 5839ba6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 18 additions & 2 deletions behave/features/dnf4.feature
Original file line number Diff line number Diff line change
@@ -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
14 changes: 6 additions & 8 deletions behave/features/dnf5.feature
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions behave/steps/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion mock/integration-tests/testenvironment
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5839ba6

Please sign in to comment.