dnf/tests
Petr Písař b7eb2e399c automatic: Fix detecting releasever_minor
When running dnf-automatic in RHEL 10.0 where releasever_minor should
default to "0", releasever_minor variable was incorrectly detected as
undefined. That led to expanding a metalink for an EPEL repository to
a wrong URL.

The cause was a bad logic in updating the release, releasever_major,
and releasever_minor triplet in dnf.cli.cli.Cli._read_conf_file():
Setting release invalidates releasever_major and releasever_minor. At
the same time for backward compatibilty detected release only contains
the major number.

This bug did not manifest in "dnf upgrade" command because "dnf"
program does not explicitly construct dnf.Base() before calling
_read_conf_file(). That is dnf-automtic first detected releasever=10
and releasever_minor=0 when calling _setup_default_conf() via
dnf.Base(). But then _read_conf_file() called by dnf-automatic set
releasever again to 10, that rewrote releasever_minor to None and
then _read_conf_file() set releasever_minor to releasever_minor, i.e
to None.

This patch does not change the code flow to minimize regressions.
Instead it saves the original releasever_minor value to be able to
default to it again.

Resolve: #2259
2025-07-28 14:52:15 -04:00
..
api tests: Patch detect_releasevers, not detect_releasever 2025-02-07 06:38:40 +01:00
automatic Add reboot option to DNF Automatic (RhBug:2124793) 2023-01-26 15:33:20 +01:00
cli tests: Patch detect_releasevers, not detect_releasever 2025-02-07 06:38:40 +01:00
conf conf: Test for segfaulting iterator in ConfigParser 2025-06-13 09:44:13 +02:00
etc conf: Test for segfaulting iterator in ConfigParser 2025-06-13 09:44:13 +02:00
keys tests: Use PGP keys without SHA-1 2024-07-24 12:06:40 +02:00
modules Update the test repositories 2020-11-19 12:01:35 +01:00
plugins Fix remaining tests to pass flake8. 2018-02-09 22:42:25 +01:00
repos Fix recreate script 2021-02-03 12:14:45 +01:00
.gitignore [tests] Ignore generated tests configurations in git 2018-10-04 10:10:10 +02:00
CMakeLists.txt Set top-level directory for unittest 2021-05-19 15:40:55 +02:00
README [swdb] drop transaction comparison test 2018-05-22 15:38:22 +02:00
__init__.py Replace python-nose with unittest 2021-03-09 13:31:14 +01:00
mock.py Spelling fixes. 2014-01-18 23:49:11 +02:00
support.py tests: Patch detect_releasevers, not detect_releasever 2025-02-07 06:38:40 +01:00
test_api.py [tests] Fix tests to use clean installroot with new history db 2020-03-20 18:28:42 +01:00
test_arch.py Fix assumptions about ARMv8 and the way the rpm features work 2019-11-22 10:00:21 +01:00
test_base.py tests: Patch detect_releasevers, not detect_releasever 2025-02-07 06:38:40 +01:00
test_check.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_cli.py tests: Patch detect_releasevers, not detect_releasever 2025-02-07 06:38:40 +01:00
test_cli_format.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_cli_progress.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_commands.py Simplify the code around parsing transaction IDs 2020-09-04 13:28:03 +02:00
test_comps.py Handle empty comps group name (RhBug:1826198) 2020-06-08 08:37:13 +00:00
test_config.py automatic: Fix detecting releasever_minor 2025-07-28 14:52:15 -04:00
test_crypto.py tests: Use PGP keys without SHA-1 2024-07-24 12:06:40 +02:00
test_distsync.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_dnssec.py fix testing data for DNSSEC 2018-10-03 07:05:28 +02:00
test_downgrade.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_downgrade_to.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_exceptions.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_fill_sack_from_repos_in_cache.py Fix typo in test file 2023-11-14 12:52:32 +01:00
test_goal.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_groups.py Add comps groups/envs to the in-progress transaction right away 2021-03-10 15:59:27 +01:00
test_history.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_history_undo.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_i18n.py Fix remaining tests to pass flake8. 2018-02-09 22:42:25 +01:00
test_install.py Revert "[config] Return vector options as tuple" 2018-10-09 12:21:27 +02:00
test_libcomps.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_list.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_lock.py Tests: Avoid the multiprocessing forkserver method 2025-01-07 10:17:04 +01:00
test_logging.py Close file handles during tests 2025-05-14 12:25:13 +02:00
test_main.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_match_counter.py Search command is now alphabetical (RhBug:1811802) 2020-05-14 09:12:20 +02:00
test_misc.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_modules.py Report missing default profile as an error (RhBug:1669527) 2019-07-15 10:58:37 +02:00
test_package.py Package: add a get_header() method (RhBug:1876606) 2021-01-20 13:34:27 +01:00
test_persistor.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_plugin.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_provides.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_queries.py Add all candidates for reinstall to solver 2024-03-01 19:00:15 +01:00
test_reinstall.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_remove.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_repodict.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_repoquery.py repoquery: Allow uppercased query tags 2023-04-17 06:53:11 +02:00
test_rpmconnection.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_sack.py Use rpm.TransactionSet.dbCookie() to determining if rpmdb has changed 2022-02-04 17:12:11 +01:00
test_sanity.py Fix tests to pass flake8. 2018-01-09 14:26:41 +01:00
test_subject.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_transaction.py [swdb]: Rename 'swdb' to 'transaction'. 2018-05-22 15:38:22 +02:00
test_upgrade_to.py Refactor tests to create/close self.base in setUp/tearDown. 2018-02-09 22:42:25 +01:00
test_util.py repo: Improve *.repo config path ordering to fix a comps merging issue 2021-03-03 12:55:31 +01:00

README

= DNF Testing Framework =

What will not be tested:

* all combinations of query parameters (tested in hawkey)
* rpm transactions themselves (tested in RPM)
* depsolving (the core depsolving algorithms are tested in libsolv, correctly
  setting up libsolv is hawkey's job)

== The repos/ directory ==

This directory contains sample package data for testing. The goal is to have as
few packages as possible, ideally one or two per a specific testing role they
can play.