summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [stable-2.13] Improve split integration test. (#78738)Matt Clay2022-12-122-2/+9
| | | | | | | | | | | * Omit redundant fact gathering. * Add connection type to split test. * Add user info to split integration test. (cherry picked from commit 2e5e802) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.13] ansible-test - Improve container management. (#79538)Matt Clay2022-12-0641-262/+3298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ansible-test - More flexible become support. (cherry picked from commit 5666c6d6a3207f279cbb3ce0b0bd070ab5a9ecd4) * ansible-test - Add support for more remotes. (cherry picked from commit 24d91f552cad2a485f286f3c34cbba2005599ab4) * ansible-test - Enable ACLs on FreeBSD remotes. This allows integration tests to switch from one unprivileged user to another, sharing files between the users using ACLs. (cherry picked from commit b63812bc08fd00fd772c28a2604f77f487d23104) * ansible-test - Enable ACL support on more remotes. (#78299) (cherry picked from commit 8bb20fe06b458e6d7c4290dcb86cced3bce9d825) * ansible-test - Install `acl` on Alpine remotes. (#78303) (cherry picked from commit 8565deaae393a136ada071c27a8b7791d3640e41) * ansible-test - Use sudo for all remotes. (#78310) (cherry picked from commit f3f4ad93325725b91902984b419502e8b4b97188) * ansible-test - Fix Ubuntu 20.04 bootstrapping. (#78551) (cherry picked from commit d683c5bd212375c9ffc785ab65ee6e68ea913c8b) * ansible-test - Verify executables are executable. (#78606) (cherry picked from commit ece85abbc46e087187caf6e05b1515b97c578531) * ansible-test - Use --tmpfs to run containers. (#78605) (cherry picked from commit 4187707f035a5dde9d02e99e5dec40d71b06d5d1) * ansible-test - Remove Fedora 35 support. (#78720) (cherry picked from commit 38a82a5cc43ed4b48cf5fbc3addc5d2993c37eef) * ansible-test - Fix container error handling. (#78739) (cherry picked from commit 79f67ed56116be11b1c992fade04acf06d9208d1) * ansible-test - Improve container management. (#78550) See changelogs/fragments/ansible-test-container-management.yml for details. (cherry picked from commit cda16cc5e9aa8703fb4e1ac0a0be6b631d9076cc) * ansible-test - Fix container detection. (#79530) (cherry picked from commit 80d2f8da02052f64396da6b8caaf820eedbf18e2) * Update test matrix symlinks. (#78737) * Add remote platform symlinks. These were already supported by ansible-test. This change adds the symlinks for use in the CI test matrix. * Remove obsolete AIX test symlink. AIX was already removed from ansible-test. (cherry picked from commit 62221a3be214082610ba33c62e82bc3a778be7fb) * Use patched containers without VOLUME instruction. * Make test suite compatible with older ansible. * Fix compatibility with Python 3.8.
* [stable-2.13] Fix file touch check mode result (backport of #79422) (#79526)sbettid2022-12-061-0/+76
| | | | | | | | | * Fix file touch check mode result (#79360) (#79422) Fixes #79360 (cherry picked from commit 3936b5c471068d86c3e51a454a1de2f0d2942845) * Rename changelog fragment according to PR number
* [backport][2.13][PRs #78402 #79289] Enable the `reboot` integration test in ↵Sviatoslav Sydorenko2022-12-062-35/+40
| | | | | | | | | | | | | | | | | | | CI (#79491) * Enable the `reboot` integration test in CI Co-Authored-By: Matt Clay <matt@mystile.com> (cherry picked from commit bb7ad0f0d8febb5020eec36bb4a52cc95c9a4486) * [CI] Move running `reboot` integration test to group 2 PR #79289, follow-up for #78402. It was breaking the integration-aliases sanity test, but only became apparent post-merge. This patch fixes that. (cherry picked from commit 26a477561168cd731c86fb1ceffb0394c81cb0a7) Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* [stable-2.13] Don't use color in jinja_plugins test.Matt Clay2022-12-051-0/+2
| | | | | | | This should prevent color codes from interfering with string matches. (cherry picked from commit 31f9d60b8d00452c96ebec423c6a263b9d2eebd7) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.13] ansible-test - Improve pylint command consistency. (#78896)Matt Clay2022-11-221-1/+1
| | | | | | | | | * ansible-test - Improve pylint command consistency. Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> (cherry picked from commit bc274f5) Co-authored-by: Matt Clay <matt@mystile.com>
* [2.13] Log `runme.sh` execution in integration tests (#79283)Sviatoslav Sydorenko2022-11-038-11/+8
| | | | | | | | | | | | | | | | * Log `runme.sh` execution in integration tests (#79263) * Log `runme.sh` execution in integration tests This patch adds `set -x` where it's missing in the integration tests. It also enables `pipefail` in `runme.sh` scripts that use pipes. * Add a change note for PR #79263 (cherry picked from commit 6674c43edd203d1241507c4d857f555a7c844c18) * Delete a bad PR #79263 change note (cherry picked from commit 9cfb3f73e8d7f910e226de3aebe6f9b9b18327ec)
* [stable-2.13] ansible-test - Fix and update documentation links..Matt Clay2022-11-034-17/+32
| | | | | | (cherry picked from commit 938c0fa944cabdc1a21745abade7f05ac3e6ee26) Co-authored-by: Matt Clay <matt@mystile.com>
* mention acl in permissions errors (#79209) (#79251)Brian Coca2022-10-281-1/+1
| | | | | | | | as chmod/mode is not the only thing we attempt and Ubuntu not shipping acl in newer versions can lead to some confusion fixes #79146 (cherry picked from commit 0f18ddca9f4b04cacd85a8a54a6fcc8f8b2ee38e)
* [stable-2.13] Don't assume column index for netmask and broadcast (#79121) ↵Matt Martz2022-10-261-0/+42
| | | | | | | | | | (#79133) * Don't assume column index for netmask and broadcast. Fixes #79117 * fix typo (cherry picked from commit f53dbf9) Co-authored-by: Matt Martz <matt@sivel.net>
* [2.13] ansible-galaxy - fix unnecessary api check when installing role (#79143)Sloane Hertel2022-10-262-1/+8
| | | | | | | | | | | | | | | * ansible-galaxy install - fix unnecessary api check when installing a role from git repo (#79090) * delay server api evaluation until a GalaxyRole needs to make an api call for info, list, and install (cherry picked from commit cb2e434dd2359a9fe1c00e75431f4abeff7381e8) * fix type for older python * Fix isinstance check (#79159) Use GalaxyAPI for isinstance check instead of RoleDistributionServer, since the latter is defined in __main__ sometimes (when running integration tests or ansible-galaxy from source) and importing from ansible.cli.galaxy won't reference the same object. (cherry picked from commit 89d682464b65af6d2f77a148fc6abb2c38b0e994)
* copy, avoid moving non temp remote 'non' files (#79102) (#79155)Brian Coca2022-10-262-0/+42
| | | | | | * copy, avoid moving non temp remote files that are not dirs/files fix tests (cherry picked from commit f66016df0e22e1234417dc3538bea75299b4e9eb)
* fix password lookup's use of f=v settings (#76551) (#79108)Brian Coca2022-10-261-31/+40
| | | | | | | | | | | | | * fix password lookup's use of f=v settings (#76551) update tests (cherry picked from commit 5d253a13807e884b7ce0b6b57a963a45e2f0322c) * fix password unit tests (#79113) (cherry picked from commit c4d6629bce3cbcaff56685315b98b98027fdd3a4) Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* [stable-2.13] Fix ansible-test-git test for newer git versions.Matt Clay2022-10-251-1/+1
| | | | | | | | | The latest versions of `git` include a fix for CVE-2022-39253. The fix blocks the file protocol by default. See: https://github.com/git/git/blob/45c9f05c44b1cb6bd2d6cb95a22cf5e3d21d5b63/Documentation/RelNotes/2.30.6.txt (cherry picked from commit 4202acb41b4ee42c5e9e52a07ac56d49045ec943) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.13] Restrict `wheel` below v0.38.0 under Pythons < 3.7 (#79187)Sviatoslav Sydorenko2022-10-243-0/+3
| | | | | | | | | | | | | | | | | * Restrict `wheel` below v0.38.0 under Pythons < 3.7 * Add a change note for PR #79187 * Update changelogs/fragments/79187--wheel-0.38.0.yml Co-authored-by: Matt Clay <matt@mystile.com> * Use constraints file when installing wheel. Co-authored-by: Matt Clay <matt@mystile.com> (cherry picked from commit a76bbb18a5a80cda0d9683677aa8d5cd8a2e6093) Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* [2.13] apt - fix failure when package is not installed and only_upgrade=True ↵Sloane Hertel2022-09-291-7/+13
| | | | | | | | | | | | | | | (#78791) * apt - fix failure when package is not installed and only_upgrade=True (#78781) * apt - fix module failure when package is not installed and only_upgrade is True * changelog (cherry picked from commit 4b45b4b09d9257006f7b23237293c8c1a04521d8) * apt - fix module short-circuiting when a package is not installed and only_upgrade is True (cherry picked from commit 14f46845f9e74aac26aa54004c88a414926afc6a)
* [2.13] Limit Galaxy API calls during ansible-galaxy dependency resolution ↵Sloane Hertel2022-09-282-0/+58
| | | | | | | | | | (#78722) * Limit Galaxy API calls during ansible-galaxy collection dependency resolution when possible Installing a tarfile with a dependency from a Galaxy server (e.g. dependencies: {'ns.coll': '>=1.0.0'}) does not get the available versions of the dependency from the galaxy server if a sufficient version is already installed. Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> (cherry picked from commit 41b62f7db459b7c3a1d97302da3b9f2cbf302670)
* [stable 2.13] Fix known host changed status when removing non-existing key ↵sbettid2022-09-282-0/+35
| | | | | | | | | | | | | | | | | #78598 (#78878) * Fix known_hosts changed status when removing non-existing key (#78748) * Ensure no change is reported when removing missing key for host with other keys Co-authored-by: Matt Martz <matt@sivel.net> * Add changelog for fix known hosts wrong changed status cherry pick * Remove old changelog for fix known hosts wrong changed status * Rename changelog according to PR number Co-authored-by: Matt Martz <matt@sivel.net>
* [stable-2.13] ansible-test - Fix integration test target filter. (#78862)Matt Clay2022-09-2212-4/+68
| | | | | | | | - Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes. - Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213). (cherry picked from commit d3d7785472ce18ee79c2abb893be1cf40ff563dd) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.13] Don't request repo updates when only testing modes (#78843) ↵Matt Martz2022-09-211-0/+5
| | | | | | | (#78849) (cherry picked from commit 2542048) Co-authored-by: Matt Martz <matt@sivel.net>
* [stable-2.13] wait_for - Read file and perform comparisons using bytes to ↵Matt Martz2022-08-312-0/+30
| | | | | | | | | | | | | | | | avoid decode errors (#78317) (#78660) * wait_for - Read file and perform comparisons using bytes to avoid decode errors. Fixes #78214 * Write non-ascii via script instead of static file * Use contexlib.closing to support py27 context manager * Use executable from task, instead of shebang * Update encoded bytes to utf16 (cherry picked from commit 9d4ced1) Co-authored-by: Matt Martz <matt@sivel.net>
* Fix pytest collection during test_host partial run (#78594)Sviatoslav Sydorenko2022-08-311-0/+0
| | | | | | | | | | | | | Sometimes pytest errors out with an `ImportError` during its tests collection stage when a Python package/directory containing the test module does not have an `__init__.py` in it. This is being observed under Python 3.9 and higher. The patch provides a workaround for this problem but does not address the root cause which is currently unknown. Ref: https://github.com/ansible/ansible/pull/78585#issuecomment-1220885431 (cherry picked from commit beb70daf14bc14acad076b34dca39a3ca6b633bb)
* [stable-2.13] Fix --role-file arg detection (#78475) (#78522)Matt Martz2022-08-311-0/+9
| | | | | | | | | | * Fix --role-file arg detection. Fixes #78204 * Do not traceback, give better error * Add coverage for compound shortopts to match -r. Fixes #78491 (cherry picked from commit 86298b7) Co-authored-by: Matt Martz <matt@sivel.net>
* Fail fast in stuck `ansible-galaxy-collection` (#78627)Sviatoslav Sydorenko2022-08-311-1/+12
| | | | | | | | | | | | This specific integration test gets stuck periodically causing the Galaxy jobs to be killed on timeout wasting an hour of runtime. The module that gets stuck waiting on Pulp is an in-test one, called `setup_collections`. When it works, the task is complete in around 70 seconds but when it doesn't, it just freezes the whole play. This patch attempts to make it fail faster by putting a reasonable timeout value of 2 minutes. (cherry picked from commit f1c56e988dbbb769b34a3c80baa40c916b4d0c88)
* Replace get_persistent_connection_options in task_executor with get_options ↵Kate Case2022-08-311-0/+2
| | | | | | | | | | | | (#74446) (#78590) Replace get_persistent_connection_options with get_options Remove special case for network sub_plugin in _set_plugin_options Try to avoid mock connection pretending to be persistent Rename variables->options to reflect what they actually are Gather options for ssh_type_conn on network_cli Drop reliance on sub_plugin["type"] (cherry picked from commit bf1ef5a1f3562c9a59168adbc78750304c3e4309)
* Fix apt making changes in check mode (#78496) (#78530)Sloane Hertel2022-08-312-0/+52
| | | | | | | | | | | | | | | * Don't actually update the cache in check mode Add tests for updating the cache in check mode * Don't mark packages as manually installed in check mode and add a test for it * changelog * Update test/integration/targets/apt/tasks/apt.yml * fix test (cherry picked from commit 3add5e932178799f8409f3255f148260efa7b4ac)
* apt: include apt preferences (e.g. pinning) when selecting packages (#78327) ↵Sloane Hertel2022-08-311-0/+58
| | | | | | | | | (#78462) Fixes #77969 (cherry picked from commit 04e892757941bf77198692bbe37041d7a8cbf999) Co-authored-by: Patrick Hemmer <phemmer@users.noreply.github.com>
* Filter on any Fedora-Cloud-Base image (#78669)Matt Martz2022-08-301-1/+1
|
* [2.13] Disable `connection_paramiko_ssh` under FreeBSD 13.0 (#78643)Sviatoslav Sydorenko2022-08-251-0/+1
|
* [stable-2.13] Fix file integration test chattr/lsattr check. (#78614) (#78618)Matt Clay2022-08-221-0/+2
| | | | | | | On BusyBox systems such as Alpine, chattr on a tmpfs fails with a status of 0 and output only on stderr. This change updates the test to not assume output on stdout. (cherry picked from commit 2e536c0afb9008884a0f12e8e650541e0ead76c9)
* Update mypy test. Fix type hints for Python 3.9. (#78587)Matt Clay2022-08-194-11/+24
| | | | | This also bumps the minimum controller version (for mypy only) to Python 3.9. (cherry picked from commit cc5ac88c4c97a7f538f135cb659c73c4bbdd02ef)
* [stable-2.13] ansible-test - Fix ansible-doc sanity test FQCN. (#78518). ↵Matt Clay2022-08-157-4/+142
| | | | | (#78519) (cherry picked from commit 2b63fdd1b8dd8383a9b09b601d80623cd76ce579)
* [stable-2.13] ansible-test - Fix self-test change handling. (#78521) (#78523)Matt Clay2022-08-152-4/+7
| | | | (cherry picked from commit 99016653a29cc2c1c5aa05324ed92dabf5e9f1fc)
* Fix listing collections that are missing the metadata required by build ↵Sloane Hertel2022-08-032-2/+40
| | | | | | | | | | | | | | (#76596) (#78411) * Rethread pr/70185 through the dependency resolver Hang optional metadata toggle on the ConcreteArtifactsManager instead of threading it through whole list codepath Don't error while listing collections if a collection's metadata is missing keys required for building a collection. Give an informative warning if metadata has been badly formatted. Co-authored-by: Sam Doran <sdoran@redhat.com> (cherry picked from commit 05608b20e8f875d51866a184f8c579fe60498e05)
* Fix removing existing dir/files with `ansible-galaxy collection init ↵Sloane Hertel2022-08-031-0/+45
| | | | | | | | | --force` (#78403) (#78412) * Remove collection contents when re-initializing with --force Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> (cherry picked from commit a2174fc6d9d8b8a7a514d0588bf9b52eaf5fc153)
* [ansible-galaxy] Fix listing collections with null namespace/name/version ↵Sloane Hertel2022-08-031-2/+17
| | | | | | | | | metadata (#77014) (#78410) * Fall back to implicit namespace.name from the path if the metadata is invalid * Test listing a collection with null namespace/name/version fields in its galaxy.yml (cherry picked from commit f8ec660e62c6797d6f2fce2a173d96684d8a9b42)
* config error origin (#78407) (#78409)Brian Coca2022-08-031-1/+1
| | | (cherry picked from commit 9b79d6ba3582bb0ef339738b7e1ade879d00dfe3)
* PluginLoader now installs module-to-be-imported in sys.modules before exec ↵Matt Davis2022-08-032-0/+34
| | | | | (as Python import does). (#78364) (#78367) (cherry picked from commit 1368bfa34821df099fde36c6e655d92d40bf24f5)
* [stable-2.13] ansible-test - Parse content config only once. (#78418) (#78426)Matt Clay2022-08-0316-46/+165
| | | (cherry picked from commit f2abfc4b3d03a2baa078477d0ad2241263a00668)
* 2.13: template module/lookup: fix convert_data for macros (#78259) (#78269)Martin Krizek2022-08-033-0/+19
| | | | | | | | | | | | | * template module/lookup: fix convert_data for macros (#78259) Fixes #78141 (cherry picked from commit 9afdb7fec199c16b33d356ef8c6ab2a1ef812323) * Fix templating nested vars with convert_data=False (#78273) Regression introduced in #78259. (cherry picked from commit d070b03ad89d6384f26314c53098bf006f703a3f)
* honor use_proxy parameter (#77312) (#78261)Nicolas Karolak2022-08-031-0/+20
| | | | | | | | | | * honor use_proxy parameter * fix uri test with "use_proxy: no" * fix urls.py module Co-authored-by: Carlos <Juan.Carlos.Cardenas.Viera@ibm.com> (cherry picked from commit 1d9c68d27e10b6023d294d48e873ba4cdde46bbb) Co-authored-by: h4rr21 <juankchess13@hotmail.com>
* yum: fix releasever for latest (#78066) (#78242)Martin Krizek2022-08-031-0/+19
| | | | | Fixes #78058 (cherry picked from commit 2bc2153c01beb4305bb639dbbe342dc925ce66e1)
* [stable-2.13] Fix KeyError for ansible-galaxy when caching paginated ↵Matt Martz2022-08-031-0/+80
| | | | | | | | | | | | | | | | responses from v3 (#78325) (#78405) * Fix KeyError for ansible-galaxy when caching paginated responses from v3 * changelog * generate responses in loop for test Co-authored-by: Matt Martz <matt@sivel.net> (cherry picked from commit 5728d72) Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* [stable-2.13] ansible-test - Fix TTY and output handling. (#78350).Matt Clay2022-07-2716-34/+152
| | | | | | (cherry picked from commit a3c90dd0bcb4aecfc64a4a584e52aec77ee61158) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.13] ansible-test - Fix handling of args after `--` (#78328)Matt Clay2022-07-272-70/+44
| | | | | | (cherry picked from commit 0012263c7acd971335d9f1c8a0ccc69b7e3325ee) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.13] Refactor ansible-test integration tests. (#78168) (#78362)Matt Clay2022-07-2732-50/+351
| | | | | | | | | | | | | | | | | | | | * Relocate update-ignore.py for easier re-use. * Add script to ease collection testing. * Skip ignore rewrite if file does not exist. * Add integration test for the shebang sanity test. * Fix ansible-test-no-tty integration test. Previously the test only verified a TTY was not used if a TTY already existed. This prevented the test from verifying behavior when run in CI. Now the test creates a PTY before invoking ansible-test. * Clean up ansible-test-docker integration test. (cherry picked from commit f70cc2fb7e58d524977df0762b748ec93315eef5) Co-authored-by: Matt Clay <matt@mystile.com>
* Drop custom repo from libuser install @ Alpine CI (#78305) (#78306)Sviatoslav Sydorenko2022-07-202-1/+6
| | | | | | | | | | | `group` and `setup_cron` integration tests currently install `libuser` and `faketime` packages respectively, from the non-default edge/testing repositories. It is no longer necessary to do so for the former so this patch drops the repo option. As for the latter, this patch includes a note explaining when the same could be done for it too. This patch also adds a note on installing `faketime` on Alpine in CI. (cherry picked from commit 619a1fa7e29749a91f7c5e6d5b5a6129bb57eca0)
* Fix wording for :ref|term: substitution (#78216) (#78221)Brian Coca2022-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix workding for :ref|term: subsitution now matches 'seealso' and makes more sense: ``` delay: applies_to: - Task description: Number of seconds to delay between retries. This setting is only used in combination with `until`. ``` vs ``` delay: applies_to: - Task description: Number of seconds to delay between retries. This setting is only used in combination with website for `until`. ``` * updated unit tests * match see also * more sanity (cherry picked from commit d26801e9943a4603975965a24d8ad83ac8798dba)
* password lookup argument parsing fix (#78080) (#78102)Brian Coca2022-07-061-0/+45
| | | | | fixes #78079 (cherry picked from commit cea18bf60a4bfe23baf10a7a2118a04abd9558fa)
* Move undefined check from concat to finalize (#78165) (#78179)Martin Krizek2022-07-064-0/+15
| | | | | | | | | | | | | | In the classic Jinja2's Environment str() is called on the return value of the finalize method to potentially trigger the undefined error. That is not the case in NativeEnvironment where string conversion of the return value is not desired. We workaround that by checking for Undefined in all of our concat functions. It seems simpler to do it earlier in the finalize method(s) instead. As a side-effect it fixes an undefined variable detection in imported templates. Fixes #78156 ci_complete (cherry picked from commit 17d52c8d647c4181922db42c91dc2828cdd79387)