Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for pre-transaction-actions plugin, improve post-transaction-actions plugin test #1459

Conversation

jrohel
Copy link
Contributor

@jrohel jrohel commented Feb 26, 2024

Created from tests for post-transaction-actions.

Requires rpm-software-management/dnf-plugins-core#523

@jrohel
Copy link
Contributor Author

jrohel commented Feb 26, 2024

It seems that CI il is not related to this PR.

@kontura
Copy link
Contributor

kontura commented Feb 26, 2024

It seems that CI il is not related to this PR.

Yes that is an issue caused by libsolv update, here is a fix to update our CI: #1452.

@kontura kontura self-assigned this Feb 28, 2024
| out | |


Scenario: Do not traceback when reason change is in transaction
Copy link
Contributor

Choose a reason for hiding this comment

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

The Scenario name mentions reason change but I don't see any changing reasons in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kontura
The behaviour of the pre-transaction-actions plugin is the same as that of post-transaction-actions plugin. So I reused (copied) tests for post-transaction-actions plugin.
The author of this test is @jmracek . I will check the tests.

| key | value |
| installonlypkgs | installonlyA |
| installonly_limit | 2 |
When I execute dnf with args "-v install installonlyA-1.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the -v flag required in these executions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. I will remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

-v is redundant

"""
When I execute dnf with args "-v install installonlyA-2.2"
Then the exit code is 0
And Transaction is following
Copy link
Contributor

Choose a reason for hiding this comment

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

Reason change happen when install and remove kernel in one transaction. This is a workaround that fix logic of history DB in background of DNF.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like that reason change is added only in DNF5, and not in DNF4

jrohel added 2 commits March 1, 2024 19:27
Created from tests for post-transaction-actions.
- to store/check all lines use appending ">>" instead of ">"
  in output redirection
- removed unnecessary dnf argument "-v"
- added comment about reason change
@jrohel jrohel force-pushed the dnf4/tests_pre-transaction-actions_plugin branch from c497dcc to 823563f Compare March 1, 2024 18:30
@jrohel jrohel changed the title Tests for pre-transaction-actions plugin Tests for pre-transaction-actions plugin, improve post-transaction-actions plugin test Mar 1, 2024
@kontura
Copy link
Contributor

kontura commented Mar 4, 2024

Thank you, the failing tests are not related.

@kontura kontura merged commit dfb129e into rpm-software-management:dnf-4-stack Mar 4, 2024
2 of 3 checks passed
kontura added a commit to kontura/ci-dnf-stack that referenced this pull request Mar 11, 2024
jan-kolarik pushed a commit that referenced this pull request Mar 18, 2024
Since #1459
the tests require the pre-transaction plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants