Bug 1650446 - [TestOnly] Test that plugins have access to transaction items after transaction is finished
Summary: [TestOnly] Test that plugins have access to transaction items after transacti...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: amatej
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-16 08:06 UTC by Daniel Mach
Modified: 2019-10-02 10:52 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-10-02 10:52:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Mach 2018-11-16 08:06:28 UTC
Create a test for following scenario:

When Plugin.transaction() hook is executed, it must have access to all transaction items in base.transaction.

pseudo-code:

class Plugin:
    def transaction(self):
...

base.install("pkg")
base.resolve()
base.do_transaction()
^^^ Plugin.transaction() triggers and have access to information about the installed package

Comment 1 Eli Young 2018-11-28 04:39:40 UTC
While this bug is filed TestOnly, it appears that, at least in the version of dnf shipped with Fedora 29, the functionality is also actually broken. I'm finding self.base.transaction empty inside the Plugin.transaction() method.

Comment 2 Ben Cotton 2019-08-13 16:59:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 3 Ben Cotton 2019-08-13 18:56:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 5 amatej 2019-10-02 10:52:26 UTC
The test has become part of our ci suite and is regularly run.


Note You need to log in before you can comment on or make changes to this bug.