summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* password lookup, handle ident properly when saved (#80251) (#80310)Brian Coca2023-04-171-3/+14
| | | | | | | | | | | | | | | | | | * password lookup, handle ident properly when saved (#80251) * password lookup, handle ident properly when saved Currently we format and save ident when present but we didn't account for this when reading the saved file Also added some more robust error handling. (cherry picked from commit 0fd88717c953b92ed8a50495d55e630eb5d59166) * fix try block indent# https://chris.beams.io/posts/git-commit/ * clog (cherry picked from commit 97c8da77838e93b416c5e700abafa89a8383e950) * fix bad merge indentation
* Change ansible_job_id format (#79951) (#80282)Martin Krizek2023-04-174-15/+15
| | | | | | | | | | | | * Change ansible_job_id format ...to be something that does not resemble float or other type which value could be changed by literal_eval that jinja2_native uses. Specifically the format of '%d.%d' is converted from str to float and then back to float which may result in truncating the number resulting in the job not being found because the job id does not exist. (cherry picked from commit 09e0fb3516a793009a1b2ac8bfcc758016a10c6d)
* fix using templated values for include/import role FA (#80320) (#80378)Sloane Hertel2023-04-174-0/+41
| | | | | | | | | | | | | * fix using templated values for include/import role options 'public', 'allow_duplicates', and 'rolespec_validate' * pass templated values without changing the instance * Fix templating by setting always_post_validate to True and calling IncludeRole.post_validate() instead ci_complete * add changelog (cherry picked from commit 666188892ed0833e87803a3e80c58923e4cd6bca)
* Ansible.Basic - Improve temporary file cleanup process (#80293) (#80324)Jordan Borean2023-04-121-0/+162
| | | | | | | * Ansible.Basic - Improve temporary file cleanup process * Add comment on struct value used (cherry picked from commit ba4505f5cb2fb52cda450a06679ddea3599e3e70)
* Fetch signatures from galaxy after the dependency resolver runs (#80334) ↵Sloane Hertel2023-04-121-1/+2
| | | | | | | | | | (#80398) Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking. Reduce the verbosity to `-vvvv` (to match other Galaxy API calls) to see this activity. Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com> (cherry picked from commit 460abe0ceffc5ca99b3cc2f2e3ef07aa2cb225dc)
* [stable-2.14] ansible-test - Add support for argcomplete 3 (#80482) (#80485)Matt Clay2023-04-112-5/+23
| | | (cherry picked from commit 0371ea08d6de55635ffcbf94da5ddec0cd809495)
* [stable-2.14] ansible-test - Fix packaging change classification (#80360) ↵Matt Clay2023-03-293-5/+15
| | | | | (#80361) (cherry picked from commit 5d64024f1ab1283750f2211692970dfa1b351ed5)
* [2.14] ansible-doc: fix broken seealso links in text output (#80285)Felix Fontein2023-03-285-2/+73
| | | | | | | | | | | | | * ansible-doc: fix broken seealso links in text output (#80280) * Fix broken URLs. * Also remove auto-generated description for modules outside ansible.builtin. (cherry picked from commit fafb23094e77a619066a92a7fa99a7045292e473) * Fix URL processing. (#80295) (cherry picked from commit 086ae4220957cdb66eee8aa060c151a071f3b9bd)
* [stable-2.14] Fix url lookup test to use test container (#80284) (#80287)Matt Clay2023-03-231-2/+2
| | | (cherry picked from commit 054aa9215857f376ee4d387339e6b82bcc14b437)
* [stable-2.14] 📦 Switch sdist build-system to pure setuptools (#80255) ↵Matt Clay2023-03-211-9/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#80261) * [stable-2.14] 📦 Switch sdist build-system to pure setuptools (#80255) This patch modifies the in-tree build backend to build sdists that swap out pointers to it in the `pyproject.toml`'s `[build-system]` section. The effect of this is that the first build from source (for example, from a Git checkout) uses our PEP 517 in-tree build backend. But the produced tarball has `build-backend` set to `setuptools.build_meta` which is the native build backend of `setuptools`. So any following builds from that sdist will skip using the in-tree build backend, calling the setuptools' one. The good news is that if the first build generated the manpages, they will be included and won't go anywhere even though, a different build system is in place. Combined with #80253, this will make sure not to modify the current source checkout on that first build. Co-authored-by: Matt Clay <matt@mystile.com> (cherry picked from commit 7097df3eed979446830fc579613ffb9b7e7c19bf) Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com> * Make PEP 517 mutation tests use pinned old setuptools (#80262) * Pin setuptools to lowest supported @ PEP 517 test This allows catching the behavior of builds under old setuptools. * Stop invoking `setup.py install` in tests This is not the part we care about since it involves dealing with the external runtime dependencies rather than building our source distribution. (cherry picked from commit eebfd71a6da396b011e664604c9991543205d780) --------- Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
* Use FAs with inheritance only when applicable (#80026) (#80076)Martin Krizek2023-03-203-0/+14
| | | | | | | | | | ... and set default value of an attribute on an object only in NonInheritableFA. Fixes #79777 ci_complete (cherry picked from commit 6c3d2a4e51df560e350d1ca3d6a039bf0e05f2ab)
* copy - fix check mode with remote_src=True (#78624) (#80176)Sloane Hertel2023-03-201-2/+39
| | | | | | | | | * Don't create dest directory in check mode uncomment existing test Fix checking for file attribute changes in check mode and add a test (cherry picked from commit b7a0e0d79278906c57c6dfc637d0e0b09b45db34)
* [stable-2.14] ansible-test - Update git diff handling (#80202)Matt Clay2023-03-1511-176/+193
| | | | | | | This change allows ansible-test to work with newer versions of git on AZP.. (cherry picked from commit bad8843124a50493141a3e3d7920353239021389) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] Relocate the AZP entry point scripts (#80114)Matt Clay2023-03-1422-452/+38
| | | | | | | Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead. (cherry picked from commit f47bc03599eedc48753d2cd5e1bea177f35e6133) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Remove pointless comparison (#80168)Matt Clay2023-03-141-1/+1
| | | | | | (cherry picked from commit 31658031ed40f3db002b690b436b793634c2b5e7) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Fix vendoring support (#80074)Matt Clay2023-03-145-0/+67
| | | | | | | | - Support loading of vendored Python packages. - Exclude vendored Python packages from payloads. (cherry picked from commit 6bfe6b899a4881ebc065834a43a26e123d7fdab3) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Show Python version before install (#80022)Matt Clay2023-03-141-0/+15
| | | | | | | Always indicate the Python version being used before installing requirements. (cherry picked from commit 5e3db6e44169aa88cd027f469eea96f1f17fea95) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Allow target prefixes to use `_` (#80021)Matt Clay2023-03-145-7/+17
| | | | | | | Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character. (cherry picked from commit e6cffce0eb58ba54c097f4ce7111bb97e6805051) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Improve code formatting (#79983) (#80206)Matt Clay2023-03-13110-294/+717
| | | | | | | | | | | | | | | | | | * ansible-test - Add blank lines after docstrings * ansible-test - Preserve formatting of arg pairs * ansible-test - Remove unused string * ansible-test - Remove pointless dict() usage * ansible-test - Clean up initial func arg indenting * ansible-test - Clean up constructor arg indenting * ansible-test - Clean up func arg wrapping * ansible-test - Clean up comma and paren placement (cherry picked from commit 715ab99462b1799f4a0c1caeddf161e930adf13f)
* [stable-2.14] ansible-test - Fix file permissions for delegation (#80203)Matt Clay2023-03-138-16/+104
| | | | | | | | | | | | | | | | | | | | | | * [stable-2.14] ansible-test - Fix file permissions for delegation (#79932) * ansible-test - Fix file permissions for delegation * Set more restrictive permissions for SSH key * Check all execute bits, not just owner * Add a breaking_changes changelog entry (cherry picked from commit c8c1402) Co-authored-by: Matt Clay <matt@mystile.com> * ansible-test - Fix collection delegation (#79947) (cherry picked from commit 079383384790310dd6722b08ac18990e2a4d0ed9) --------- Co-authored-by: Felix Fontein <felix@fontein.de>
* [backport-2.14] 📦 Integrate manpage builds into PEP 517 build backend ↵Sviatoslav Sydorenko2023-03-075-0/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#80129) This patch creates a thin wrapper around the `setuptools`' PEP 517 build backend in-tree. It features an ability to request generating the manpage files in the process of building a source distribution. This toggle is implemented using the `config_settings` mechanism of PEP 517. One must explicitly pass it a CLI option to the build front-end to trigger said behavior. The packagers are expected to use the following call: python -m build --config-setting=--build-manpages This option has no effect on building wheels. 🧪 The change includes integration tests This test runs building and re-building sdists and wheels with and without the `--build-manpages` config setting under the oldest-supported and new `setuptools` pinned. It is intended to preserve the interoperability of the packaging setup across Python runtimes. An extra smoke test also verifies that non PEP 517 interfaces remain functional. PR #79606 Co-authored-by: Matt Clay <matt@mystile.com> (cherry picked from commit 56036013cd09db0f1b20402a69be44345ddafb22)
* [stable-2.14] ansible-test - Fix pylint error with old home dir (#80151) ↵Matt Clay2023-03-071-0/+11
| | | | | | | | | | | | (#80152) * [stable-2.14] ansible-test - Fix pylint error with old home dir (#80151) (cherry picked from commit 27287b40c0605e583145538ac072260095c139d7) Co-authored-by: Matt Clay <matt@mystile.com> * ansible-test - Fix error with missing pylint home (#80155) (cherry picked from commit 367d45facd3af9bbc8159e4371d94e95629bed6d)
* [stable-2.14] Fix MANIFEST.in includes (#80147) (#80148)Matt Clay2023-03-061-1/+0
| | | (cherry picked from commit 7c62cdeecd4834a1ca38a01e42ea07e33044de19)
* [stable-2.14] Do not use hardcoded httpbin.org in uri tests (#80101) (#80102)Matt Martz2023-02-281-2/+2
| | | (cherry picked from commit 060a27f)
* strategy fix invalid variables being registered (#79706) (#79818)Brian Coca2023-02-165-0/+58
| | | | | also added tests for normal and bad cases (cherry picked from commit 281474e809a0a76f6a045224d9051efda6e1f0ec)
* Make using blocks as handlers a parser error (#79993) (#80010)Martin Krizek2023-02-166-12/+47
| | | | | Fixes #79968 (cherry picked from commit bd329dc54329a126056723311abd7442ed6a0389)
* [2.14] don't ignore templated _raw_params that k=v parser failed to parse ↵Matt Davis2023-02-153-4/+22
| | | | | | | | | | | (#79913) (#79964) * don't ignore templated _raw_params that k=v parser failed to parse (#79913) fixes #79862 (cherry picked from commit e1d298ed61eed9250752fbd25ac8eae4944ec1bf) * backport test change to runme.sh
* fix installing collections from git repos that contain MANIFEST.json ↵Sloane Hertel2023-02-153-0/+57
| | | | | | | | | | | | | | | | | (#79808) (#79826) * add null 'manifest' key to metadata for git repo collections containing MANIFEST.json changelog * set to Sentinel instead of None * Test installing a collection in a git repo that contains a MANIFEST.json * fix test * Update changelogs/fragments/ansible-galaxy-install-git-src-manifest.yml (cherry picked from commit 321848e98d9e565ee3f78c8c37ca879a8e3c55c1)
* Fix conditionally notified include handlers (#79804) (#79807)Martin Krizek2023-02-153-0/+14
| | | | | Fixes #79776 (cherry picked from commit 10eda5801ad11f66985251b5c3de481e7b917d3c)
* [stable-2.14] ansible-test - Support Podman 4.4.0+Matt Clay2023-02-141-0/+7
| | | | | | (cherry picked from commit 67d49734f732f543c0b8d7713466c0aa3b8f484f) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Clean up indentation and spaces (#79980) (#79982)Matt Clay2023-02-1057-534/+534
| | | (cherry picked from commit 58d84933fc4cc873b58e9500838fe80c59280189)
* Bump acme test container. (#79783) (#79816)Felix Fontein2023-02-101-1/+1
| | | (cherry picked from commit 5fb8bc3ddb40c3f09f76d2237951c7754ba27add)
* [stable-2.14] ansible-test - Specify config path in plugin error (#79881) ↵Matt Clay2023-02-101-4/+4
| | | | | (#79977) (cherry picked from commit d48d1c23df171074e799717e824a8c5ace470643)
* [stable-2.14] ansible-test - Fix various type hinting issues. (#79798) (#79976)Matt Clay2023-02-1043-135/+123
| | | | | | | | | | | | | | | | | | | * ansible-test - Add missing type hints. * ansible-test - Remove redundant type hints. * ansible-test - Fix return type annotations. * ansible-test - Add assert, casts to assist mypy. * ansible-test - Fix incorrect type hints. * ansible-test - Remove no-op code. * ansible-test - Fix incorrect types. * ansible-test - Fix method signature mismatch. (cherry picked from commit c9f20aedc04088f10b864b8f976688384abd50de)
* [stable-2.14] ansible-test - Remove obsolete DirectoryTarget. (#79975)Matt Clay2023-02-102-27/+13
| | | | | This code has been unused since at least the 2.9 release. (cherry picked from commit 5f58015527cb0fb6332d77249787e6effa374da5)
* [stable-2.14] ansible-test - fix warning to include image name (#79560) (#79973)Matt Clay2023-02-101-1/+1
| | | | | (cherry picked from commit 0a12d8a5bc820e5d12805af41b80351d0b635e63) Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
* [stable-2.14] ansible-test - Avoid direct use of `errno`. (#79972)Matt Clay2023-02-105-36/+14
| | | | | Error handling on Python 3.x no longer requires the use of `errno` to identify specific errors. (cherry picked from commit f9715f436ce0590a5441fa7f13c1aa60cdeb6585)
* Fix traceback in template action with ANSIBLE_DEBUG=1 (#79764) (#79775)Martin Krizek2023-01-233-0/+13
| | | | | Fixes #79763 (cherry picked from commit 4f5ed249727dc0c271e07b045e514cc31e25c2de)
* Argument spec alias handling: actually report deprecated aliases in ↵Felix Fontein2023-01-194-3/+247
| | | | | | | | | | | | | | | | | suboptions, and fix warning message in suboptions when two aliases of the same option are used (#79740) (#79770) * Normalize deprecation records. * Fix alias deprecations in suboptions. * Report in which option an alias warning happened for suboptions. * Add deprecation tests for suboptions. * Also test deprecation in list of dicts. * Adjust unit tests for toplevel alias deprecation field name change. (cherry picked from commit 8a7185c224eb6e116d1233d37d57bbbb223cb5bb)
* [2.14] fix role argument spec error for invalid suboptions & fix reporting ↵Felix Fontein2023-01-193-0/+101
| | | | | | | | | | | | | | | of deprecated arguments for modules (#79738) * fix role argument spec error for invalid suboptions (#76578) fixes https://github.com/ansible/ansible/issues/75536 (cherry picked from commit b5b239fd715d7c543562a6119db18699c00df582) * Fix reporting of deprecated arguments for modules. (#79681) (cherry picked from commit 1a47a21b65d3746a9feeeceea0cf15eaf011efef) Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* [stable-2.14] Ensure we are passing ciphers to all url_get calls (#79718) ↵Matt Martz2023-01-181-1/+1
| | | | | | | | | | | | (#79727) * Ensure we are passing ciphers to all url_get calls. Fixes #79717 * Add clog frag * Fix tests (cherry picked from commit 2143bcd) Co-authored-by: Matt Martz <matt@sivel.net>
* ansible-galaxy - fix turning off the ConcreteArtifactManager's validate ↵Sloane Hertel2023-01-181-38/+60
| | | | | | | | | certs at the global level (#79561) (#79696) Fix ignoring certs when downloading tarballs Fix ignoring certs when downloading a collection from a specific source that isn't in the configured servers list (cherry picked from commit acbf4cc60e9338dc08421c8355d69bfcdfde0280)
* Correctly count rescued tasks in play stats (#79724) (#79728)Martin Krizek2023-01-182-0/+26
| | | | | | | Fixes #79711 ci_complete (cherry picked from commit e38b3e64fd5f9bb6c5ca9462150c89f0932fd2c4)
* ansible-test - fix ps argspec check inside cmdlet (#79699)Jordan Borean2023-01-1110-3/+134
| | | | | | | | | | * ansible-test - fix ps argspec check inside cmdlet * Added error condition test * Fix sanity problem (cherry picked from commit ee33be9484b2240aa7b6b3bfdb30b452b6048e85)
* [stable-2.14] validate-modules: don't fail on invalid YAML (#79682)Evgeni Golov2023-01-064-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | * validate-modules: don't fail on invalid YAML When validate-modules encounters invalid YAML (e.g. in the EXAMPLES section), it tries to reformat the exception to include the line number in the Python file instead of the line number of the embedded YAML document. However, PyYAML doesn't allow modification of the Mark object (anymore) which leads to a new exception being raised, instead of reporting the original exception. As the original exception is not needed in other places anymore, we don't have to modify it at all and can just compute the right line number when reporting the error via ansible-test. Fixes: #75837 * Add test for invalid module doc YAML syntax. Co-authored-by: Matt Clay <matt@mystile.com> (cherry picked from commit a7111c4dbb91e912aeb799d9728ce739f2ae83d3) Co-authored-by: Evgeni Golov <evgeni@golov.de>
* [stable-2.14] Fix EPEL setup for integration tests on RHEL 7Matt Clay2023-01-042-9/+5
| | | | | | (cherry picked from commit 1243d2ace0aa6dc609369dafee7ad52cf9aa26ef) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Improve container startup handling.Matt Clay2022-12-152-9/+74
| | | | | | | | | | | Also improve the ansible-test-container integration test: - Add coverage for the no-probe code path. - Add work-arounds for centos6 containers (to support backporting). - Avoid systemd debug when the container doesn't use cgroup. (cherry picked from commit 04fc98c794d425a42f83a062c163c981d8751512) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] Add more retries to ansible-test-container test.Matt Clay2022-12-141-3/+8
| | | | | | (cherry picked from commit f6c0e22f98e3ad1e0a98837053ed03a27d8a1fcf) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Support RSA SHA-1 for SSH clients.Matt Clay2022-12-144-8/+70
| | | | | | (cherry picked from commit 75b60b17ee1ff18ded04cf07b71e4ee32e673a0b) Co-authored-by: Matt Clay <matt@mystile.com>
* [stable-2.14] ansible-test - Fix `--prime-containers` and `--explain` (#79581)Matt Clay2022-12-122-4/+18
| | | | | | | | | * Remove unused code. * Fix explain errors. * Fix `--prime-containers` with docker on cgroup v2. (cherry picked from commit da3b1d3f50bfbe118f2200e3e2ef109d87da4c2e) Co-authored-by: Matt Clay <matt@mystile.com>