Commit graph

11 commits

Author SHA1 Message Date
Adam Miller
397febd343 YUM4/DNF compatibility via yum action plugin (#44322)
* YUM4/DNF compatibility via yum action plugin

DNF does not natively support allow_downgrade as an option, instead
that is always the default (not configurable by the administrator)
so it had to be implemented

 - Fixed group actions in check mode to report correct changed state
 - Better error handling for depsolve and transaction errors in DNF
 - Fixed group action idempotent transactions
 - Add use_backend to yum module/action plugin
 - Fix dnf handling of autoremove (didn't used to work nor had a
   default value specified, now does work and matches default
   behavior of yum)
 - Enable installroot tests for yum4(dnf) integration testing, dnf
   backend now supports that
 - Switch from zip to bc for certain package install/remove test
   cases in yum integration tests. The dnf depsolver downgrades
   python when you uninstall zip which alters the test environment
   and we have no control over that.
 - Add changelog fragment
 - Return a pkg_mgr fact if it was not previously set.
2018-08-27 10:17:47 -07:00
Martin Krizek
ab1db9bcb8 yum: clean fake repos after tests run (#37770) 2018-03-22 13:19:29 -04:00
Pilou
47d8d8c36e Fix yum integration tests (#35177)
* use tests instead of filters

* Don't check 'rc', use success/failed tests

- yum module use 'fail_json' which set 'failed'
- 'rc' is for backward compatibility:
  bbd6b8bb42/lib/ansible/executor/task_executor.py (L571)
- besides yum module doesn't document any return values

* Allow to run tests twice in a row

ansible-test is executed with '--retry-on-error' switch, then tests must
be able to executed twice in a row.

Error was:
TASK [yum : install group] ***
ok: [testhost] => {
    "attempts": 1,
    "changed": false,
    "failed": false,
    "invocation": { [...] },
    "msg": "",
    "rc": 0,
    "results": []
}

TASK [yum : verify installation of the group] ***
fatal: [testhost]: FAILED! => {
    "assertion": "yum_result.changed",
    "attempts": 1,
    "changed": false,
    "evaluated_to": false,
    "failed": true
}
2018-01-27 12:35:18 +01:00
Martin Krizek
e2fc61c554 Add yum integration tests using fake repo (#31646) 2017-10-18 13:07:48 +02:00
Martin Krizek
98b19f0623 yum: fix changed in group remove 2017-08-29 11:48:29 -04:00
berenddeschouwer
b1c57ea443 Installroot OS version check fix (#20180)
Cast to int before checking the OS version.
This prevents the DNF tests from running on
Fedora < 23
2017-01-12 18:02:35 -08:00
Toshio Kuratomi
cd2516bf8d Revert "Revert "Add --installroot to YUM and DNF modules, issue #11310""
This reverts commit b73ddd5212.
2017-01-05 00:24:20 -08:00
Matt Clay
b73ddd5212 Revert "Add --installroot to YUM and DNF modules, issue #11310" 2017-01-05 00:14:33 -08:00
berenddeschouwer
1fdcda0996 Add --installroot to YUM and DNF modules, issue #11310 (#19861)
* Add --installroot to YUM and DNF modules, issue #11310

This continues ansible-modules-core#1558, and
ansible-modules-core#1669

Allow specifying installroot for the yum and dnf modules
to install and remove packages in a location other than /.

* Remove empty aliases

* Simpler installroot set default logic
2017-01-04 19:20:00 -08:00
Adrien Vergé
0e834fc9e4 Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.

Since key duplication problems were removed in 4d48711, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
2016-11-11 14:50:57 -08:00
Matt Clay
75e4645ee7 Migrate Linux CI roles to test targets. (#17997) 2016-10-13 09:09:25 -07:00
Renamed from test/integration/roles/test_yum/tasks/main.yml (Browse further)