Commit Graph
100 Commits
Author SHA1 Message Date
Matt ClayandGitHub 95e3af3e0f ansible-test - Improve container network detection (#84323)
When detection of the current container network fails, a warning is now issued and execution continues.
This simplifies usage in cases where the current container cannot be inspected, such as when running in GitHub Codespaces.
2024-11-19 10:49:24 -08:00
Matt ClayandGitHub 9d249432c4 Increase scope of mypy sanity test (#84288)
* Increase scope of mypy sanity test

* Fix issues reported by mypy
2024-11-09 02:58:29 +00:00
Matt ClayandGitHub a98801903d ansible-test - Replace FreeBSD 13.3 with 13.4 (#84236)
* ansible-test - Replace FreeBSD 13.3 with 13.4
* ansible-test - Fix typos in bootstrap.sh
* Skip libfaketime on FreeBSD except FreeBSD 14
2024-11-07 13:19:26 -08:00
Matt ClayandGitHub 68bfa37838 ansible-test - Fix interactive cmd traceback (#84264) 2024-11-05 23:50:34 +00:00
Matt ClayandGitHub c49e94017a Improvements for the create-bulk-issues.py script (#84235)
* Improve error handling for create-bulk-issues.py

* Add support for setting assignee

* Add example YAML to feature --help output.

* Add additional help message for token issues.
2024-11-01 15:15:59 -07:00
Matt ClayandGitHub 48be6f8b6f ansible-test - Improve container probe error handling (#84109) 2024-10-10 22:58:38 +00:00
Matt ClayandGitHub b3950bc864 Add NoReturn annotations in module_utils (#84106) 2024-10-10 16:58:27 +00:00
Matt ClayandGitHub 56bab1d097 Enable bad-docstring-quotes pylint rule for core (#84100)
* Enable bad-docstring-quotes pylint rule for core

* Ignore previously bulk update in git blame
2024-10-09 21:57:05 +00:00
Matt ClayandGitHub a0495fc314 Update triple single quotes to triple double quotes (#84099)
* 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-09 21:22:35 +00:00
Matt ClayandGitHub 62ce21b6e4 ansible-test - Work around pylint issue on 3.11 (#84094) 2024-10-09 17:19:55 +00:00
Matt ClayandGitHub 83671ecb39 ansible-test - Enable pylint docstyle for tests (#84092)
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-09 15:38:32 +00:00
Matt ClayandGitHub 0b661438a0 ansible-test - Update base/default containers (#84089) 2024-10-08 18:33:04 -07:00
Matt ClayandGitHub 955e310b4c Cover unit tests with mypy (#84084)
* 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-08 13:29:37 -07:00
Matt ClayandGitHub 50604e8461 ansible-test - Update astroid for pylint sanity test (#84054) 2024-10-04 13:18:07 -07:00
Matt ClayandGitHub 3cf308f672 ansible-test - Disable pylint deprecated-* rules (#84050) 2024-10-04 08:31:46 -07:00
Matt ClayandGitHub 9406ed3109 ansible-test - Update sanity tests and default Python (#83998)
* 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-03 09:59:56 -07:00
Matt ClayandGitHub 9abc651cd6 ansible-test - Update nios-test-container to 6.0.0 (#84042) 2024-10-02 16:37:37 +00:00
Matt ClayandGitHub facf9186b4 Test entry points with editable install (#84002)
This allows collection of code coverage for the entry points.
2024-09-24 11:23:20 -07:00
Matt ClayandGitHub c0fb71a642 Move ansible-deprecated ignores for tests inline (#83989) 2024-09-23 17:33:01 -07:00
Matt ClayandGitHub 7693c892fa ansible-test - Use Python version in pylint contexts (#83984) 2024-09-23 13:40:10 -07:00
Matt ClayandGitHub 31d73b0645 Replace binary_modules Makefile with Python script (#83925)
Also update the platform list:

* Remove linux ppc64le
* Add darwin arm64
2024-09-09 15:06:36 -07:00
Matt ClayandGitHub a84fa50096 ansible-test - Update base/default containers (#83930) 2024-09-09 20:54:02 +00:00
Matt ClayandGitHub cf2a4a85da ansible-test - Update sanity test requirements (#83921) 2024-09-09 11:22:28 -07:00
Matt ClayandGitHub cd342f76b4 release.py - Use changelog requirements (#83920)
Use the changelog sanity test requirements instead of the package-data sanity test requirements.

This enables removal of most package-data sanity test requirements, as they are no longer used by the test itself.
The additional requirements were being maintained only to provide pinned requirements for building the changelog during a release.
2024-09-09 10:49:04 -07:00
Matt ClayandGitHub e3ccdaaa2e release.py - Include pyproject.toml in git add (#83892) 2024-09-03 21:27:50 -07:00
Matt ClayandGitHub b544ac13ec release.py - Add missing setuptools arg to prepare (#83887)
* release.py - Add missing setuptools arg to prepare

This allows the prepare command to accept the `--no-setuptools` argument.

It also fixes a traceback when using the `prepare` command.

* Use a more accurate type hint
2024-09-03 15:05:26 -05:00
Matt ClayandGitHub 4346430003 ansible-test - Reduce scope of empty-init test (#83878) 2024-08-30 16:46:45 -07:00
Matt ClayandGitHub 49490d92c3 Update boilerplate sanity test (#83879)
The `annotations` future can now be imported as `_annotations`.
2024-08-30 16:36:20 -07:00
Matt ClayandGitHub 9d42b34ed3 Fix Windows entries in test matrix (#83873)
The display names need to be set so code coverage reporting works.
2024-08-29 11:07:01 -07:00
Matt Clay db04499f58 ansible-test - Update nios-test-container to 5.0.0 2024-08-28 10:58:40 -07:00
Matt Clay 81e025b414 ansible-test - Add Windows remote connection option 2024-08-15 13:40:42 -07:00
Matt ClayandGitHub a3ee846a64 Use a venv in more integration tests (#83799)
* Use venv for pause test
* Use venv for debugger test
* Use venv for builtin_vars_prompt test
2024-08-14 17:10:05 -07:00
Matt ClayandGitHub 6eb16faed2 ansible-test - Update base/default containers (#83796) 2024-08-14 20:40:10 +00:00
Matt ClayandGitHub da02611c48 ansible-test - Update sanity test requirements (#83795)
* Remove PyYAML pin for yamllint sanity test
* Freeze sanity test requirements
2024-08-14 19:00:59 +00:00
Matt ClayandGitHub ab624ad031 ansible-test - Remove generation of egg-info (#83786)
Also remove egg-info generation from hacking/env-setup scripts.
2024-08-14 09:03:51 -07:00
Matt ClayandGitHub b25afbb4e9 Suppress cryptography warnings for paramiko (#83772) 2024-08-12 17:28:27 -07:00
Matt ClayandGitHub 68515abf97 Drop use of setup.py and setup.cfg (#81443) 2024-08-12 13:54:29 -05:00
Matt ClayandGitHub 59ca05b709 ansible-test - Update default and distro containers (#83736) 2024-08-06 19:47:43 -07:00
Matt ClayandGitHub 70be017f02 ansible-test - Update mypy and package-data tests (#83734)
* package-data - Test min/max setuptools version

* Fix multi-version abstraction

* Convert mypy test to script based test

* Fix f-string in pymarkdown test

* Sanity test fixes
2024-08-06 17:48:02 -07:00
Matt ClayandGitHub 717f1092e3 ansible-test - Update venv management and sanity requirements (#83729)
* ansible-test - Update venv management
* Upgrade from pip 24.0 to 24.2
* Omit `wheel` and `setuptools` from ansible-test managed virtual environments
* Drop pre-release hacks
* Update mypy requirements
* Freeze sanity test requirements
* Update sanity test configuration
* Update sanity ignores
2024-08-06 14:53:40 -07:00
Matt ClayandGitHub ac5ed40a21 Fix type hints and misc mypy/pylint issues (#83724) 2024-08-05 19:30:37 -07:00
Matt ClayandGitHub 6019f3f425 ansible-test - Update coverage to 7.6.1 (#83723) 2024-08-05 15:27:49 -07:00
Matt ClayandGitHub 4e69d83fac release.py - Auto-update setuptools upper bound (#83713)
When releases are prepared, the upper bound on setuptools in pyproject.toml will be automatically updated
to the latest version available on PyPI. This version will then be tested by the package-data sanity test
during the release process and will be used to build the release.

This change ensures that a released version of ansible-core can be built in the future if a new setuptools
release includes breaking changes that would prevent building a functional package. If a downstream package
maintainer requires a newer setuptools version than the upper bound permits, they can patch pyproject.toml
as needed. Since ansible-core releases support specific Python versions, lack of support for new setuptools
releases will have no effect on support for future Python versions.
2024-08-05 16:59:26 -05:00
Matt ClayandGitHub 5ae8b5b3a6 Remove EXTERNALLY-MANAGED marker in apt test (#83706)
The marker is removed in ansible-test managed environments, but the apt test restores it
by installing/upgrading packages. To avoid breaking later tests, the marker needs to be
removed again.

ci_complete
2024-08-01 13:31:47 -07:00
Matt ClayandGitHub 79f819dc54 ansible-test - Remove VyOS tests and support files (#83650)
The VyOS remote image required for running the tests is no longer functional.
2024-07-22 13:42:06 -07:00
Matt Clay f261a6142f Use build instead of pep517 for integration test 2024-07-19 10:03:29 -07:00
Matt Clay b90c3a8de5 Revert "🧪 Use setuptools [core] @ collections_runtime_pythonpath (#83627)"
This reverts commit 0d5460df16.
2024-07-19 10:03:29 -07:00
Matt ClayandGitHub 906c969b55 ansible-test - Improve unknown env error message (#83610) 2024-07-15 16:37:40 +00:00
Matt ClayandGitHub 9cdfcd9aed ansible-test - Update nios-test-container to 4.0.0 (#83539) 2024-07-09 10:37:11 -07:00
Matt ClayandGitHub 10997ab3aa ansible-test - Update base/default containers (#83553) 2024-07-09 17:25:20 +00:00
Matt ClayandGitHub 20a815b03f Quality-of-life improvements for release tool (#83551)
* Quality-of-life improvements for release tool

- Default devel releases to b1
- Default non-devel releases to rc1
- Default to release announcement to console
- Avoid auto-links in GH release annoucements for file sizes
2024-07-09 10:17:28 -07:00
Matt ClayandGitHub 8f1fddb161 Enable Ubuntu 24.04 group 6 in CI (#83466)
* Enable Ubuntu 24.04 group 6 in CI

* Disable rootfull Podman on Ubuntu

* Disable unix-chkpwd AppArmor profile on Ubuntu for Fedora 40 tests

* Document AppArmor and rootfull issues
2024-06-25 08:42:51 -07:00
Matt ClayandGitHub a121a169e3 ansible-test - Replace FreeBSD 14.0 with 14.1 (#83477) 2024-06-20 15:20:10 -07:00
Matt ClayandGitHub 96c04e9d1d ansible-test - Update PyPI and utility container (#83475) 2024-06-19 01:31:33 +00:00
Matt ClayandGitHub dad6f07731 ansible-test - Update tested platforms (#83446)
* ansible-test - Update tested platforms

* Add work-around for Alpine tests

* Fix prepare_http_tests on Fedora

* Fix deb-src setup for Ubuntu 24.04+

* Set multiarch_test_pkg for Ubuntu 24.04

* Update AZP test matrix
2024-06-17 23:17:04 +00:00
Matt ClayandGitHub 44f22162cb Remove timezone support module and tests (#83465)
The timezone support module was used only for changing the timezone in the user module integration tests.

Changing the timezone for the tests is unecessarily complex for the purpose of asserting proper parsing of user expiration times.
2024-06-17 15:06:39 -07:00
Matt ClayandGitHub f4751766db selinux compat - add ignore, proper ex chaining (#83460) 2024-06-17 13:26:41 -07:00
Matt ClayandGitHub 5af5b4b6c8 ansible-test - Update PyPI test container to 3.1.0 (#83432) 2024-06-13 08:52:43 -07:00
Matt ClayandGitHub 738180d240 ansible-test - Fix unit test coverage collection (#83433) 2024-06-12 15:47:58 -07:00
Matt ClayandGitHub cf265eb14d Add Python 3.13 support (#83416)
* Add Python 3.13 support

* Add temporary work-around for yamllint test
2024-06-11 11:36:10 -07:00
Matt ClayandGitHub 14df8c2cf2 ansible-test - Prepare for Python 3.13 (#83414)
Includes an update to `coverage` and pinned Python requirements.
2024-06-10 19:33:33 -07:00
Matt ClayandGitHub 531bc9891f Fix issues reported by mypy (#83413) 2024-06-10 18:18:33 -07:00
Matt ClayandGitHub 6ab26707de Fix quoting in fork_safe_stdio test (#83412) 2024-06-10 17:13:15 -07:00
Matt ClayandGitHub 2e60bef855 Update azure-pipelines-test-container (#83302) 2024-06-06 17:19:57 -07:00
Matt ClayandGitHub 560d3af097 ansible-test - Update http-test-container (#83272)
* Disable cipher suite integration tests

When the client and server both support TLS 1.3, cipher suite selection is effectively a no-op.

Python provides no way to disable TLS 1.3 cipher suites, and no way to prefer user-selected cipher suites.
Since TLS 1.3 includes a mandatory cipher suite, this makes it impossible to induce a cipher suite related error when using TLS 1.3.

* Update multipart form-data integration test

* Fix netrc integration tests

* Update HTTP test host substring

* ansible-test - Update http-test-container
2024-05-19 12:36:00 -07:00
Matt ClayandGitHub b8483adb33 ansible-test - Update pypi-test-container (#83273) 2024-05-19 12:35:44 -07:00
Matt ClayandGitHub 930f18ea65 ansible-test - Update ansible-test-utility-container (#83274) 2024-05-19 12:35:32 -07:00
Matt ClayandGitHub 6aa8192131 Multi-arch support for container test (#83196) 2024-05-03 18:15:37 -07:00
Matt ClayandGitHub 3461f1d757 Build test modules for aarch64 (#83195) 2024-05-03 17:42:59 -07:00
Matt Clay 8bc0d809a6 Update sdist path in release tool
The latest setuptools package uses a normalized package name for the sdist.
2024-04-16 10:13:40 -07:00
Matt Clay cd365057d3 Remove more Python 2.x compat code 2024-04-08 12:55:52 -07:00
Matt Clay 5187061939 ansible-test - Update base/default containers 2024-04-08 10:09:58 -07:00
Matt ClayandGitHub 1c17fe2d53 Drop Python 3.7 support (#82982) 2024-04-04 09:41:14 -07:00
Matt ClayandGitHub 9e08f78bd3 ansible-test - Update base/default containers (#82952) 2024-04-01 20:13:11 +00:00
Matt ClayandGitHub 31901d23e7 ansible-test - Remove FreeBSD 13.2 (#82951) 2024-04-01 18:14:32 +00:00
Matt Clay ca168eb367 ansible-test - Fix Alpine libexpat bootstrapping 2024-03-22 12:27:35 -07:00
Matt Clay b4d67adfda ansible-test - Update distro containers to 7.1.0 2024-03-21 21:40:01 -07:00
Matt ClayandGitHub a1ad7100df ansible-test - Handle externally managed Python (#82883)
Remove EXTERNALLY-MANAGED marker in ansible-test managed environments

Additional changes:

- Test the Alpine 3.19 container
- Stop testing Alpine 3.18 container and remote
- Add missing changelog entry the Alpine 3.19 container
2024-03-21 21:06:25 -07:00
Matt Clay 31bbc8334e Update container test cgroup handling
When the host uses cgroup v2 and does not use systemd,
skip container scenarios which are unsupported.
2024-03-21 13:19:38 -07:00
Matt Clay a192193c55 Limit Alpine 3.18 test hacks to that version 2024-03-21 12:05:05 -07:00
Matt Clay 2b1a5dd7a0 Remove outdated constraint for paramiko setup 2024-03-20 19:09:05 -07:00
a1edb61ce7 ansible-test - Add work-around for pytest>=8 errors (#82723)
* ansible-test - Add work-around for pytest>=8 errors
* Update changelogs/fragments/ansible-test-pytest-8.yml

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2024-02-21 10:08:54 -08:00
Matt Clay c8d6f7b95e ansible-test - Fix validate-modules Python handling
The ``validate-modules`` sanity test no longer attempts to process files with unrecognized extensions as Python.

Integration tests have been added to verify Python-specific checks do not apply to these files.

The `invalid-extension` and `missing-gplv3-license` checks still apply to these files. This may change in the future.
2024-02-08 08:43:08 -08:00
Matt ClayandGitHub 71d81e4a60 Add no-unwanted-characters sanity test for core (#82557) 2024-01-17 11:19:37 -08:00
Matt Clay 30169c76de Replace Unicode no-break spaces with ASCII spaces 2024-01-17 10:26:30 -08:00
Matt ClayandGitHub 5f1b3898e8 Avoid delattr in test callback plugin (#82550)
This prevents the test plugin from tampering with the base callback plugin,
which causes issues with all other callback plugins running in the test.
2024-01-16 22:57:34 +00:00
Matt Clay 21247c828e ansible-test - Bypass PEP 668 checks
When ansible-test installs requirements, it now instructs pip to allow installs on externally managed environments as defined by PEP 668.

This only occurs in ephemeral environments managed by ansible-test, such as containers,
or when the `--requirements` option is used.
2024-01-11 14:10:31 -08:00
Matt Clay 78c9090986 Don't hard-code Alpine version in container test 2024-01-10 10:09:51 -08:00
Matt Clay 71a5212586 Add skips for encrypt unit tests for Python 3.13 2024-01-05 12:17:42 -08:00
Matt Clay c75624fbdc ansible-test - Enable shellcheck SC2164 2024-01-03 17:52:29 -08:00
Matt Clay 3c432fea43 ansible-test - Update base/default test containers 2024-01-03 17:17:00 -08:00
Matt Clay a1958eefed Fix plugin_loader integration test error handling 2024-01-03 17:14:56 -08:00
Matt Clay 630e5dda25 Clean up shellcheck issues in tests 2024-01-03 16:23:25 -08:00
Matt Clay e1bcb8a534 Remove unused unit test code 2024-01-03 14:34:20 -08:00
Matt Clay 4208bdbbcd ansible-test - Update nios-test-container to 3.0.0 2023-11-30 09:59:49 -08:00
Matt Clay fd009a073a Remove sefcontext support plugin
It was only used by the subversion test, but is no longer required.
2023-11-07 17:45:13 -08:00
Matt ClayandGitHub 0e6942a4d7 Remove unused unit test code (#82168) 2023-11-07 15:59:08 -08:00
Matt Clay 98407fc00e Remove unused validate-modules unit test code 2023-11-07 13:43:11 -08:00
Matt ClayandGitHub dae4e2f07f Remove unused/unreachable unit test code (#82160) 2023-11-07 12:41:42 -08:00
Matt ClayandGitHub 0be33551d7 Remove unit tests dependent on systemd bindings (#82161)
These do no not run as part of our test suite.
2023-11-07 12:41:16 -08:00