Commit Graph

533 Commits (8d07ed6318b95f56632d39e646e6bb4cde145b51)

Author SHA1 Message Date
Matt Clay 81e025b414 ansible-test - Add Windows remote connection option 1 year ago
Matt Clay ab624ad031
ansible-test - Remove generation of egg-info (#83786)
Also remove egg-info generation from hacking/env-setup scripts.
1 year ago
Matt Clay 68515abf97
Drop use of setup.py and setup.cfg (#81443) 1 year ago
Matt Clay 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
1 year ago
Matt Clay 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
1 year ago
Matt Clay ac5ed40a21
Fix type hints and misc mypy/pylint issues (#83724) 1 year ago
Matt Clay 6019f3f425
ansible-test - Update coverage to 7.6.1 (#83723) 1 year ago
Lee Garrett 7e3916b767
Typo fixes and other bits and bobs (#83672)
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
1 year ago
Matt Clay 906c969b55
ansible-test - Improve unknown env error message (#83610) 1 year ago
Matt Clay 9cdfcd9aed
ansible-test - Update nios-test-container to 4.0.0 (#83539) 1 year ago
Matt Clay 96c04e9d1d
ansible-test - Update PyPI and utility container (#83475) 1 year ago
Felix Fontein 1b42af5004
ansible-test: update http-test-container to 3.2.0 (#83469) 1 year ago
Matt Clay 5af5b4b6c8
ansible-test - Update PyPI test container to 3.1.0 (#83432) 2 years ago
Matt Clay 14df8c2cf2
ansible-test - Prepare for Python 3.13 (#83414)
Includes an update to `coverage` and pinned Python requirements.
2 years ago
Matt Clay 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
2 years ago
Matt Clay b8483adb33
ansible-test - Update pypi-test-container (#83273) 2 years ago
Matt Clay 930f18ea65
ansible-test - Update ansible-test-utility-container (#83274) 2 years ago
Matt Davis 889012e29e
clean up ansible-connection (#82992)
* clean up ansible-connection stuff

* eliminate unnecessary usage of pty/termios
* always use default pickle protocol
* remove unnecessary wire hashing

Co-authored-by: Kate Case <this.is@katherineca.se>
2 years ago
Matt Clay 1c17fe2d53
Drop Python 3.7 support (#82982) 2 years ago
Abhijeet Kasurde b8b12c4be3
Update sanity requirements (#82296)
* Update sanity requirements
* Drop Python 3.7 for mypy

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Clay 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
2 years ago
Felix Fontein c0821346fc
Do not mangle plugin names in collections that start with an underscore. (#82574) 2 years ago
Abhijeet Kasurde 8eabeefa63 mypy: update code required to bump sanity requirements
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Clay 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>
2 years ago
Matt Clay 4208bdbbcd ansible-test - Update nios-test-container to 3.0.0 2 years ago
Matt Clay 18e8401edd
Remove Python 2.x compat from unit tests (#82109) 2 years ago
Matt Clay e933d9d8a6 ansible-test - Fix parsing of cgroup entries 2 years ago
Matt Clay 37cee8bdfc
ansible-test - Remove special cryptography install (#82008)
Python 3.10 is the minimum version on the controller, and it requires openssl 1.1.1 or later.

As a result, there's no need to check the openssl version any longer.
2 years ago
Matt Clay f5c742cdfd
ansible-test - Clean up old Python 2 compat code (#81962)
* Update generated code __future__ import

* Remove Python 2.x compat from compile sanity test

* Remove __metaclass__ from pylint good names list

* Remove Python 2.x compat from ansible-test injector

* Remove Python 2.x compat from ansible-test importer

* Remove Python 2.x compat from ansible-test units

* Remove Python 2.x compat from validate-modules

* Remove Python 2.x compat from pylint plugins

* Remove more Python 2.x compat from ansible-test

* Remove Python 2.x openssl detection in ansible-test

* Remove obsolete Python 2.x comment

* Remove obsolete ansible-test Python 2.x support

* Remove unused bootstrap script functions

* Keep mypy happy

* Remove unused imports

* Keep pylint happy
2 years ago
Sviatoslav Sydorenko d2ba76c117
Remove Python `< 3.5` `selectors` fallbacks (#81872) 2 years ago
Matt Clay 921efce43a
ansible-test - Remove more Python 2.7 / 3.6 support (#81898) 2 years ago
Matt Clay b94ee1cefd
Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
2 years ago
Matt Clay 20f17687da
ansible-test - Invoke container sleep through env (#81853) 2 years ago
Abhijeet Kasurde d8f791d88c
Bump sanity test requirements for 3.12 (#81846) 2 years ago
Sviatoslav Sydorenko ec265ec08a
Bump `coverage.py` to v7.3.2 in `ansible-test` (#81844) 2 years ago
Matt Clay 3794612832
ansible-test - Skip pylint test on Python 3.12 (#81706) 2 years ago
René Moser e4b9f9c6ae
tests: update CloudStack test container to version 1.7.0. (#81732) 2 years ago
Matt Martz 3ec7a6e0db
Fix ansible-test issues with detecting docker host and forwarding ports (#81726)
* Properly detect docker host using ssh

* Disable ControlPath when creating SSH port forwards

* typo fix

Co-authored-by: Matt Clay <matt@mystile.com>

* Add clog frag

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Sloane Hertel 67cdaa49f8
ansible-galaxy-collection - fix config permissions for galaxy-importer (#81679)
* Fix permissions for the galaxy-importer config, previously only root had
read/write

* fix ownership instead
2 years ago
Abhijeet Kasurde 1cc5efa77b
tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 5a059b81c8
ansible-test - Fix Python coverage stub generation (#81611)
As of coverage 7.1.0, files without arcs are not generated.

To work around this, an empty (0, 0) arc is used for each file instead.

This is a follow-up to https://github.com/ansible/ansible/pull/81077

ci_coverage
ci_complete
2 years ago
Matt Clay e1e0e2709c
ansible-test - Enable thread code coverage (#81604)
ci_complete
ci_coverage
2 years ago
Sviatoslav Sydorenko c59bcbe627
Bump `coverage.py` to v7.3.0 in `ansible-test` (#81077) 2 years ago
Matt Clay 390e508d27
ansible-test - Always use managed entry points (#81537) 2 years ago
Matt Clay 47ab59753c
Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
2 years ago
Matt Clay f894ce89b4
Overhaul package-data sanity test (#81427)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py.
2 years ago
Matt Clay c525514994
ansible-test - Update source layout detection (#81418) 2 years ago
Matt Clay 691c8e8603
Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
2 years ago
Sloane Hertel 48dfe8e215
add Python 3.12 support to ansible-test (#80834)
* update docker containers versions to use newer ansible-test ref in the pre-built venvs

* Allow invoking ansible-test with Python 3.12

* Add python3.12 to the INTERPRETER_PYTHON_FALLBACK

* changelog

* add Python 3.12 as a non-default Python version for the test containers

* Update mypy ignores for Python 3.12

* Add Python 3.12 to CI matrix for unit tests, generic tests, and galaxy

* Update unit test for using the Python 2 collection loader path with Python 3.

Skip the existing test on Python 3.12, since find_module is removed.

Suppress the pre-existing deprecation warnings using the Python 2
codepath with Python 3.

Add a test for Python >= 3.12, which doesn't call find_module.

* Ignore sanity test errors on systems without libselinux present.
2 years ago
René Moser 99eeaf7da8
ansible-test: cloudstack: bump test container version (#81319) 2 years ago
Matt Clay e964078a83
ansible-test - Pre-build PyYAML wheels (#81300)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0.
2 years ago
Matt Clay 3f7bf0bcd4
ansible-test - Fix sanity traceback with `-e` opt (#81271)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
2 years ago
Matt Clay 08307de366
ansible-test - Remove obsolete WinRM setup script (#81249)
The WinRM setup is handled internally by ansible-core-ci now.
2 years ago
Matt Clay 876be11f8c
Add pymarkdown sanity test for core (#81220)
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
2 years ago
Matt Clay 72e038e823
Remove `docs` and `examples` directories (#81011)
* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test
2 years ago
Sloane Hertel 67b78a17c4
Remove Python 3.9 support for the controller (#80973)
* Remove obsolete Python <=3.9 controller code
* Remove Python 3.9 test controller bootstrapping
* Update test requirements

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 3d2ff64264
ansible-test - Fix import sanity test for targets (#81184) 2 years ago
Sloane Hertel ed8a404f4a
add coverage for Python 3.12 (#81125) 2 years ago
Matt Clay c3926268e2
ansible-test - Avoid using atexit module (#81096) 2 years ago
Matt Martz 6fead15334
Pylint deprecated comment checker (#81071)
Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Sloane Hertel ecbbd7e5d1
Remove Python 3.5 support (#80972)
* Remove Python 3.5 support

* changelog

* add requested changes

* Update changelogs/fragments/remove-python3.5.yml

Co-authored-by: Matt Clay <matt@mystile.com>

* remove Python3 < 3.5 error handling

* remove Python3 < 3.5 error handling in TE too

---------

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Martz 92d5ffda82
Update galaxy_ng container for tests (#80721) 3 years ago
Matt Clay 3a1d58bc58
ansible-test - Use raise from to handle exceptions (#80905) 3 years ago
Felix Fontein a5bb4c7dee
ansible-test - local change detection without --fork-point (#79734) 3 years ago
Matt Clay b16041f1a9
ansible-test - Fix traceback when mixing sources (#80801)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling
3 years ago
Matt Clay aacab0633a
ansible-test - Fix handling of long timeouts (#80769) 3 years ago
Matt Clay 4c6aa70662
ansible-test - Fix timeout handling (#80764) 3 years ago
Matt Clay fd341265d0
ansible-test - Avoid use of deprecated utcnow (#80750)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.
3 years ago
Matt Clay 790e0b0983
ansible-test - Update the NIOS test container (#80739) 3 years ago
Matt Clay cdeb607b1d
ansible-test - Always use unique container names (#80724) 3 years ago
Matt Clay 7b50571588
ansible-test - Remove deprecated features (#80558) 3 years ago
Matt Clay 676b731e6f
ansible-test - Replace pytest-forked (#80525)
- Unit tests now report warnings generated during test runs.
- Python 3.12 warnings about `os.fork` usage with threads (due to `pytest-xdist`) are suppressed.
- Added integration tests to verify forked test behavior.
3 years ago
Matt Clay 0371ea08d6
ansible-test - Add support for argcomplete 3 (#80482) 3 years ago
Matt Clay 5d64024f1a
ansible-test - Fix packaging change classification (#80360) 3 years ago
Matt Clay 6a6824f570
ansible-test - Update CloudStack test container (#80278) 3 years ago
Matt Clay bad8843124
ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.
3 years ago
Matt Clay 31658031ed
ansible-test - Remove pointless comparison (#80168) 3 years ago
Matt Clay 367d45facd
ansible-test - Fix error with missing pylint home (#80155) 3 years ago
Matt Clay 27287b40c0
ansible-test - Fix pylint error with old home dir (#80151) 3 years ago
Matt Clay f47bc03599
Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
3 years ago
Matt Clay 6bfe6b899a
ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
3 years ago
Matt Clay bca55d945b
ansible-test - Adjust vcenter test plugin behavior (#80063)
The previous change to the default mode of operation for the plugin is now limited to collections.

This enables easier testing of the plugin in core, so the previously removed tests have been restored.
3 years ago
Matt Clay 5e3db6e441
ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
3 years ago
Matt Clay e6cffce0eb
ansible-test - Allow target prefixes to use `_` (#80021)
Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character.
3 years ago
Matt Clay 67d49734f7 ansible-test - Support Podman 4.4.0+ 3 years ago
Matt Clay 715ab99462
ansible-test - Improve code formatting (#79983)
* 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
3 years ago
Matt Clay 58d84933fc
ansible-test - Clean up indentation and spaces (#79980) 3 years ago
Felix Fontein 0793833847
ansible-test - Fix collection delegation (#79947) 3 years ago
Matt Clay c8c1402ff6
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
3 years ago
Matt Clay d48d1c23df
ansible-test - Specify config path in plugin error (#79881) 3 years ago
Matt Clay 52d3d39ffc
ansible-test - Deprecate the foreman test plugin (#79821) 3 years ago
Matt Clay 7e53ec3c01
ansible-test - Update the NIOS test container (#79820) 3 years ago
Matt Clay 27cd5e77d8
Update mypy and its dependencies. (#79812)
* Update mypy and its dependencies.

* Fix requirements.

* Remove unnecessary matching constraints.
3 years ago
Matt Clay 7329ec6936
ansible-test - Update CloudStack plugin container (#79813) 3 years ago
Felix Fontein 5fb8bc3ddb
Bump acme test container. (#79783) 3 years ago
Matt Clay c9f20aedc0
ansible-test - Fix various type hinting issues. (#79798)
* 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.
3 years ago
Matt Clay 5f58015527 ansible-test - Remove obsolete DirectoryTarget.
This code has been unused since at least the 2.9 release.
3 years ago
Matt Clay 29b20f68e6 ansible-test - Deprecate the govcsim container.
Also remove the integration tests for the `vcenter` test plugin, since the tests relied on using the simulator.
3 years ago
Felix Fontein 1852f9fab4
Support test and filter plugins in ansible-doc sanity test (#77737)
* Support test and filter plugins in ansible-doc sanity test.

* Move integration target non-filter file check_pylint.py from filter/ to plugin_utils/.
3 years ago
Matt Clay 04fc98c794 ansible-test - Improve container startup handling.
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.
3 years ago