Skip to content

Disable libdnf5 plugins during tests#97

Open
evan-goode wants to merge 1 commit into
fedora-ci:mainfrom
evan-goode:evan-goode/disable-libdnf5-plugins
Open

Disable libdnf5 plugins during tests#97
evan-goode wants to merge 1 commit into
fedora-ci:mainfrom
evan-goode:evan-goode/disable-libdnf5-plugins

Conversation

@evan-goode
Copy link
Copy Markdown

See https://pagure.io/fedora-ci/general/issue/538#comment-1001814.

Disable libdnf5 plugins during tests so newly-installed libdnf5 don't alter the behavior of DNF5 and break subsequent tests. We want to test whether packages (including libdnf5 plugins) are installable/upgradable/downgradable/removable, not whether they work correctly when executed, in the testing environment, without being configured, etc.

As mentioned in the comment, a better solution might be to only disable plugins which are not installed by default. One way to do this would be to list currently-enabled plugins:

#!/usr/bin/env python3
import libdnf5
base = libdnf5.base.Base()
base.load_config()
base.setup()
print(",".join(p.get_name() for p in base.get_plugins_info() if p.is_loaded()))

and then run DNF5 with dnf5 --disable-plugin=\* --enable-plugin=$MYPLUGINLIST. But that would be a more involved change, I think we'd need to update everywhere $YUMDNFCMD is called.

@evan-goode
Copy link
Copy Markdown
Author

The issue was moved to https://forge.fedoraproject.org/ci/tickets/issues/538.

@LecrisUT
Copy link
Copy Markdown

To avoid making permanent changes on a machine, consider putting it in the installability tmt test instead: https://github.com/fedora-ci/installability-pipeline/blob/2673077b28449d11cd5cbc5f7dcdbf976c5ebdd4/installability.fmf#L9-L20

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.

2 participants