summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* include_vars - fix including new hash variables when hash_behaviour is set ↵Sloane Hertel2024-11-141-0/+2
| | | | to merge (#84303)
* Sequence query fix (#83758)James Ramsaran2024-11-141-0/+29
| | | | Co-authored-by: flowerysong <junk+github@flowerysong.com>
* Add tests for deprecations (#84284)Abhijeet Kasurde2024-11-122-3/+12
| | | | | | | * Check for module deprecation * Check for module option deprecation * Check for plugin deprecation Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* package_facts fix empty packages on foreign mgr (#83855)Brian Coca2024-11-121-0/+40
| | | | | | | * package_facts fix empty packages on foreign mgr return the first package manager that provides output add tests with fake rpm on apt machines
* ansible-test - align 2025 connection defaults to CI matrix (#84291)Jordan Borean2024-11-111-1/+1
|
* Increase scope of mypy sanity test (#84288)Matt Clay2024-11-0916-170/+104
| | | | | * Increase scope of mypy sanity test * Fix issues reported by mypy
* Add support for Windows Server 2025 (#84285)Jordan Borean2024-11-082-1/+2
| | | Adds Windows Server 2025 to the testing matrix.
* ansible-test - Replace FreeBSD 13.3 with 13.4 (#84236)Matt Clay2024-11-077-16/+14
| | | | | * ansible-test - Replace FreeBSD 13.3 with 13.4 * ansible-test - Fix typos in bootstrap.sh * Skip libfaketime on FreeBSD except FreeBSD 14
* remove ignore clauses for module uri (#83642)Alexei Znamensky2024-11-071-1/+0
| | | Co-authored-by: flowerysong <junk+github@flowerysong.com>
* Add --flush-cache option to ansible-pull (#84211)Sloane Hertel2024-11-063-0/+13
|
* update ansible-galaxy resolvelib requirement to >= 0.5.3, < 2.0.0 (#84218)Sloane Hertel2024-11-062-7/+9
| | | | | | | * Update resolvelib upperbound to 2.0.0 Minor SemVer releases should not contain breaking changes * Test the latest minor release and reduce number of resolvelib versions tested for efficiency
* ansible-test - Fix interactive cmd traceback (#84264)Matt Clay2024-11-064-5/+41
|
* Fixed ipv6 pattern in parse_address (#84237)spyinx2024-11-051-0/+2
|
* test: fix check_required_by (#84153)Abhijeet Kasurde2024-11-021-21/+8
| | | | | | * Update the documentation for check_required_by * Fix return value for check_required_by (now returns empty list on success) Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Remove encrypt unit tests for undocumented algorithms, which are disallowed ↵Sloane Hertel2024-11-011-7/+0
| | | | in 2.19. (#84219)
* encrypt: raise error on passing unsupported passlib hashtype (#84186)Abhijeet Kasurde2024-10-312-6/+3
| | | | | | * Raise an AnsibleFilterError when unsupported passlib hashtype is provided in do_encrypt. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add --flush-cache option for ansible and ansible-console (#84149)anvitpusalkar2024-10-301-0/+8
| | | | | * Allow CLIs that accept inventory options to flush the inventory cache(s) and fact cache Fixes #83749
* Fix returning unreachable for looped tasks (#84049)Sloane Hertel2024-10-302-0/+49
| | | | | * Fix returning unreachable for looped tasks Add tests for ignore_unreachable and loop
* Add a test using ignore_errors as a variable (#84175)Sloane Hertel2024-10-294-2/+33
| | | * Add a regression test for https://github.com/ansible/ansible/issues/32384
* Remove deprecated pycompat24 and importlib (#84161)Abhijeet Kasurde2024-10-292-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Removed deprecated pycompat24 and importlib Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Make CI green Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Ignore basic.py Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Make CI green III Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> * Make CI green IV Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> --------- Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Remove deprecated plural form of collection path (#84156)Abhijeet Kasurde2024-10-291-1/+1
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Enable file module to disable diff_mode (#83700)Conner Crosby2024-10-254-0/+51
| | | | | Several tasks within the modification_time.yml and state_link.yml task lists have explicitly enabled diff_mode because these tests previously assumed a diff attribute would always be returned from the file module.
* docs: print deprecation collection name (#84126)Abhijeet Kasurde2024-10-252-1/+4
| | | | | | While showing the deprecation message, mention the collection name from which the module is removed. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Preserve `_ansible_no_log` from action result; fix `include_vars` to set ↵Matt Davis2024-10-2512-43/+148
| | | | | | | | | | | | | | | | properly (#84143) * fixes for CVE-2024-8775 * propagate truthy `_ansible_no_log` in action result (previously superseded by task-calculated value) * always mask entire `include_vars` action result if any file loaded had a false `show_content` flag (previously used only the flag value from the last file loaded) * update no_log tests for CVE-2024-8775 * include validation of _ansible_no_log preservation when set by actions * replace static values with dynamic for increased robustness to logging/display/callback changes (but still using grep counts :( ) * changelog * use ternary, coerce to bool explicitly
* user module avoid conflicts ssh pub key (#84165)Brian Coca2024-10-243-3/+113
| | | | Remove pub key if we are going to generate private fix tests for os X
* Remove deprecated compat.selector (#84155)Abhijeet Kasurde2024-10-231-2/+0
| | | | | * Removed files related to selector compat Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Fixed broken tests (#84088)Abhijeet Kasurde2024-10-186-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>
* test: Remove unreachable tests (#83696)Abhijeet Kasurde2024-10-181-147/+0
| | | | | | variable_manager unit tests are unreachable. These tests are already covered in integration tests. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Use open with context manager (#83337)Abhijeet Kasurde2024-10-183-10/+6
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Trim `selinux_policytype` @ integration tests (#84136)Sviatoslav Sydorenko (Святослав Сидоренко)2024-10-181-1/+1
| | | | The shell command sometimes prints a trailing whitespace which breaks the tests on old RHELs. This patch is supposed to fix that.
* test: use password to generate random string instead of range (#84129)Colin Watson2024-10-171-1/+1
| | | | * Use password lookup instead of range Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* test for gathering FIPS facts (#83266)Abhijeet Kasurde2024-10-161-0/+15
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* feat: checksum_algo param for find module (#83014)ShIRann Chen2024-10-111-0/+23
| | | | Co-authored-by: shirann <shirannx@gmail.com> Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
* ansible-test - Improve container probe error handling (#84109)Matt Clay2024-10-112-9/+25
|
* service_facts: add FreeBSD support (#82556)Brian Coca2024-10-101-1/+0
| | | | | new freebsd scanner using 'their version' of service cli tool also avoid loading the linuxy service scanner when freebsd
* Enable bad-docstring-quotes pylint rule for core (#84100)Matt Clay2024-10-091-0/+4
| | | | | * Enable bad-docstring-quotes pylint rule for core * Ignore previously bulk update in git blame
* Update triple single quotes to triple double quotes (#84099)Matt Clay2024-10-09168-718/+718
| | | | | | | | | * 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
* ansible-test - Work around pylint issue on 3.11 (#84094)Matt Clay2024-10-091-4/+3
|
* ansible-test - Enable pylint docstyle for tests (#84092)Matt Clay2024-10-096-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.
* ansible-test - Update base/default containers (#84089)Matt Clay2024-10-091-3/+3
|
* Cover unit tests with mypy (#84084)Matt Clay2024-10-0826-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.
* user module, avoid chmoding symlink'd home file (#83956)Brian Coca2024-10-082-1/+69
| | | | | | | 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>
* ansible-galaxy - fix ignoring certs when installing from git repos (#83332)Sloane Hertel2024-10-081-2/+38
| | | | | | | | | * 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
* ansible-test - Update astroid for pylint sanity test (#84054)Matt Clay2024-10-042-2/+2
|
* ansible-test - Disable pylint deprecated-* rules (#84050)Matt Clay2024-10-046-2/+20
|
* Implicit flush_handlers inherit play tags (#83968)Martin Krizek2024-10-042-0/+14
|
* Fix error message given by ansible.module_utils.facts.timeout.timeout (#83945)Sloane Hertel2024-10-031-3/+1
| | | | | * Update unit test Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
* ansible-test - Update sanity tests and default Python (#83998)Matt Clay2024-10-0312-23/+28
| | | | | * ansible-test - Update sanity test requirements * ansible-test - Default to Python 3.13 in base/default containers * ansible-test - Fix incorrect AnyStr type hints
* Reduce number of implicit meta tasks (#84007)Martin Krizek2024-10-036-139/+70
| | | | | | | | | | | | | | | | | 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>
* get_url: properly parse filename in content-disposition (#83748)Martin Krizek2024-10-031-0/+20
| | | | | | | | | | 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