summaryrefslogtreecommitdiffstats
path: root/test/integration/targets (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-10-18Fixed broken tests (#84088)Abhijeet Kasurde6-90/+53
* Add `match=` in pytest.raises * Remove redundant assert statements Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Co-authored-by: Matt Clay <matt@mystile.com>
2024-10-18test: Remove unreachable tests (#83696)Abhijeet Kasurde1-147/+0
variable_manager unit tests are unreachable. These tests are already covered in integration tests. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-18Use open with context manager (#83337)Abhijeet Kasurde16-66/+43
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-18Trim `selinux_policytype` @ integration tests (#84136)Sviatoslav Sydorenko (Святослав Сидоренко)1-1/+1
The shell command sometimes prints a trailing whitespace which breaks the tests on old RHELs. This patch is supposed to fix that.
2024-10-17test: use password to generate random string instead of range (#84129)Colin Watson1-1/+1
* Use password lookup instead of range Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-17Faster host removal from a handler (#84091)Martin Krizek1-1/+7
In ``Handler.notify_host`` we ensure that ``Handler.notified_hosts`` can contain particular host at most once. Therefore for removing a host it should be faster to use ``list.remove`` which removes the first item in the list, as opposed to using list comprehension removing all such items.
2024-10-16Remove configuration options that were moved to inventory plugins now that ↵Sloane Hertel1-54/+0
ansible-config supports plugin types. (#84130)
2024-10-16test for gathering FIPS facts (#83266)Abhijeet Kasurde2-19/+21
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-16Use dict comprehension instead (#83680)Abhijeet Kasurde1-5/+1
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-15Remove unnecessary code (#84085)Abhijeet Kasurde1-6/+2
* os.setsid does not return anything, so remove code which relying on return value Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-11feat: checksum_algo param for find module (#83014)ShIRann Chen5-25/+65
Co-authored-by: shirann <shirannx@gmail.com> Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
2024-10-11ansible-test - Improve container probe error handling (#84109)Matt Clay3-9/+28
2024-10-10service_facts: add FreeBSD support (#82556)Brian Coca3-3/+78
new freebsd scanner using 'their version' of service cli tool also avoid loading the linuxy service scanner when freebsd
2024-10-10Add NoReturn annotations in module_utils (#84106)Matt Clay3-3/+7
2024-10-09Enable bad-docstring-quotes pylint rule for core (#84100)Matt Clay2-0/+6
* Enable bad-docstring-quotes pylint rule for core * Ignore previously bulk update in git blame
2024-10-09Update triple single quotes to triple double quotes (#84099)Matt Clay416-2236/+2236
* Update triple single quotes to triple double quotes This change was fully automated. The updated Python files have been verified to tokenize the same as the originals, except for the expected change in quoting of strings, which were verified through literal_eval. * Manual conversion of docstring quotes
2024-10-09ansible-test - Work around pylint issue on 3.11 (#84094)Matt Clay2-4/+7
2024-10-09ansible-test - Enable pylint docstyle for tests (#84092)Matt Clay6-53/+50
This cleans up the implementation of the pylint sanity test and enables the docstyle extension rule `bad-docstring-quotes` for tests. The rule will be enabled for the rest of ansible-core once automated cleanup has been performed on existing docstrings.
2024-10-09ansible-test - Update base/default containers (#84089)Matt Clay2-3/+4
2024-10-09Fix copyright format for gather_facts and mount_facts as documented (#84087)Sloane Hertel2-2/+2
2024-10-08Cover unit tests with mypy (#84084)Matt Clay26-115/+218
* Added support for testing unit tests with mypy. * Added support for ignoring individual mypy error codes. * Added missing assert on unit tests and marked xfail. * Added type hints for some unit tests. * Added ignores for unit tests not passing mypy. * Fixed incorrect autouse argument in unit test fixtures. * Fixed minor issues causing problems with mypy in unit tests.
2024-10-08Update unique filter docs (#84078)Abhijeet Kasurde1-3/+19
* Correct case_sensitive example * Add attribute docs Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-08user module, avoid chmoding symlink'd home file (#83956)Brian Coca4-2/+74
also added tests --------- Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua> Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-10-08docs: `unique` add missing settings (#84076)Tinyblargon1-0/+12
add the `case_sensitive` setting
2024-10-08PlayIterator: skip tasks from already ran roles (#83793)Martin Krizek6-29/+23
... so strategies do not have to filter them.
2024-10-08ansible-galaxy - fix ignoring certs when installing from git repos (#83332)Sloane Hertel4-6/+49
* Fix installing collections|roles from git repos with GALAXY_IGNORE_CERTS * Fix installing collections from git repos with --ignore-certs * Update unit test * Add test case
2024-10-04ansible-test - Update astroid for pylint sanity test (#84054)Matt Clay2-2/+2
2024-10-04ansible-test - Disable pylint deprecated-* rules (#84050)Matt Clay7-2/+21
2024-10-04Implicit flush_handlers inherit play tags (#83968)Martin Krizek5-12/+41
2024-10-03Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945)Sloane Hertel3-4/+4
* Update unit test Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03ansible-test - Update sanity tests and default Python (#83998)Matt Clay13-23/+31
* ansible-test - Update sanity test requirements * ansible-test - Default to Python 3.13 in base/default containers * ansible-test - Fix incorrect AnyStr type hints
2024-10-03Reduce number of implicit meta tasks (#84007)Martin Krizek10-152/+93
This greatly reduces run time on large inventories since meta tasks are executed in the main process sequentially and just executing them is expensive. This change avoids running the following implicit meta tasks: * ``flush_handlers`` on hosts where no handlers are notified * ``noop`` for the linear strategy's lockstep, instead hosts that are not executing the current task are just not part of the current host loop A playbook consiting of two simple plays both running on ~6000 hosts runs in: devel: 37s this PR: 1.3s Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-10-03file: simplify the code (#84043)Abhijeet Kasurde2-94/+126
* Remove unnecessary code * Make code simple to read Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-03get_url: properly parse filename in content-disposition (#83748)Martin Krizek4-22/+41
Since we don't really care about the type we don't have to query for it and just retrieve the filename value. Unfortunately we cannot use module_utils.urls.get_response_filename as we don't have the response object, so just utilize email.message.Message to parse the filename instead of manually doing the work ourselves. Fixes: #83690
2024-10-03Use sentinel everywhere (#84041)Abhijeet Kasurde19-94/+92
* Use sentinel everywhere Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-10-02ansible-test - Update nios-test-container to 6.0.0 (#84042)Matt Clay2-1/+3
2024-10-02remove one ignore clause for module copy (#83643)Alexei Znamensky3-3/+4
--------- Co-authored-by: flowerysong <junk+github@flowerysong.com>
2024-10-01cron: return stdout and rc for cron command (#83290)Jack Farzan2-1/+4
Co-authored-by: Jack Farzan <jfarzan@adobe.com>
2024-10-01debconf: set empty password value (#83217)Abhijeet Kasurde4-41/+153
Fixes: #83214 --------- Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-30Prevent condor from being installed and fulfilling libfmt dependency (#84023)Matt Martz1-1/+1
2024-09-30Add additional logging for SSH runtime output timeouts and escalation ↵uber-dendy2-7/+12
messages (#84008) Signed-off-by: Yuri Savinkin <stkwar@gmail.com> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26INVENTORY_IGNORE_EXTS stop ignoring ini (#84001)Brian Coca3-1/+5
* INVENTORY_IGNORE_EXTS stop ignoring ini Originally added to avoid configuration files for inventory scripts now clashes with the much more common ini inventory files. * add a note to script plugin * Update lib/ansible/plugins/inventory/script.py Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26facts: Skip path if the distribution path is directory (#84012)Abhijeet Kasurde3-1/+21
* facts: Skip path if the distribution path is directory Skip path if the distribution path is directory instead of file. Handle exception raised while handling distribution path. Fixes: #84006 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Review requests --------- Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-26package/dnf action plugins: better facts failure msg (#83995)Martin Krizek3-9/+14
2024-09-24Test entry points with editable install (#84002)Matt Clay1-17/+32
This allows collection of code coverage for the entry points.
2024-09-24Ansible Errors, Don't hide stacked messages when yaml (#83933)Brian Coca4-8/+16
Also remove redundant msg now that we fixed yaml case So no more need to %s % e. Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2024-09-24split: Fix incorrect example result of the split builtin filter (#83982)林博仁 Buo-ren Lin1-1/+1
The following Python output proves that the second member of the resulting list should be " a", not "a": ```txt $ python3 Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> string = "jojo is, a" >>> string.split(',') ['jojo is', ' a'] ```
2024-09-24Add basic validation for action_groups (#83965)Felix Fontein6-1/+60
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2024-09-24dnf5: fix tb when plugins API is not available (#83969)Martin Krizek2-1/+11
Follow up on https://github.com/ansible/ansible/pull/83105
2024-09-24Move ansible-deprecated ignores for tests inline (#83989)Matt Clay3-17/+13