Skip to content

Conversation

@m-blaha
Copy link
Member

@m-blaha m-blaha commented Nov 22, 2019

No description provided.

And stderr is
"""
Package flac of lowest version already installed, cannot downgrade it.
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be better split into multiple scenarios? The main difference being the scenarios would be run independently, here the first fail causes the rest not to be run. Since this even tests two different commands (upgrade/downgrade), I think it would be better to split into smaller pieces.

For the common setup these tests have, Given I use repository "dnf-ci-fedora-updates" is shared with all the scenarios, so that can go into Background. And then "dnf-ci-fedora" is only required for a couple of tests it seems.

Otherwise LGTM.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the goals for this test was to make sure that upgrade/downgrade commands behave consistently - that they return the same exit code in the same situations. So I would like to keep them together. But I agree the scenario could be split into three (four) independent tests - non existent package, not installed package, already on highest (lowest) version. The background bit of course could be done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually I've split them into multiple scenarios.

@lukash lukash self-assigned this Nov 26, 2019
DNF now return 0 when the downgraded package is already
on the lowest available version.
@lukash lukash merged commit 0248a2d into rpm-software-management:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants