Skip to content

Commit

Permalink
Fix install-fails tests and enable them for dnf5
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha committed Nov 24, 2023
1 parent 71bec5b commit 0abda10
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions dnf-behave-tests/dnf/install-fails.feature
Original file line number Diff line number Diff line change
@@ -1,51 +1,43 @@
@dnf5
Feature: Installing attemps fail

# @dnf5
# TODO(nsella) different stderr
@bz1568965
Scenario: Report all missing dependencies
Given I use repository "dnf-ci-thirdparty"
Given I use repository "dnf-ci-thirdparty"
When I execute dnf with args "install SuperRipper anitras-dance"
Then stderr contains "nothing provides abcde needed by SuperRipper-1.0-1.x86_64"
Then stderr contains "nothing provides nodejs needed by anitras-dance-1.0-1.x86_64"

# @dnf5
# TODO(nsella) different exit code
@bz1599774
Scenario: Report error when installing empty file
Given I execute "touch empty.rpm" in "{context.dnf.installroot}/"
Given I set working directory to "{context.dnf.installroot}"
And I execute "touch empty.rpm"
When I execute dnf with args "install empty.rpm"
Then the exit code is 1
And stderr is
"""
Can not load RPM file: empty.rpm.
Could not open: empty.rpm
Failed to load RPM "empty.rpm": empty.rpm: not a rpm
"""

# @dnf5
# TODO(nsella) different exit code
@bz1616321
Scenario: Report error when installing text file
Given I create file "invalid.rpm" with
Given I set working directory to "{context.dnf.installroot}"
And I create file "invalid.rpm" with
"""
this is not rpm
"""
When I execute dnf with args "install invalid.rpm"
Then the exit code is 1
And stderr is
"""
Can not load RPM file: invalid.rpm.
Could not open: invalid.rpm
Failed to load RPM "invalid.rpm": invalid.rpm: not a rpm
"""

# @dnf5
# TODO(nsella) different stdout
@bz1599774
Scenario: Report error when installing non-existing RPM file
When I execute dnf with args "install no_such_file.rpm"
Then the exit code is 1
And stderr is
"""
Can not load RPM file: no_such_file.rpm.
Could not open: no_such_file.rpm
Failed to access RPM "no_such_file.rpm": No such file or directory
"""

0 comments on commit 0abda10

Please sign in to comment.