Commit Graph

26 Commits

Author SHA1 Message Date
Alex Willmer 270c3a25de tests: Support Ubuntu 22.04 as test suite runner (controller)
To do so the test suite allows a weak cryptographic alogorithm (SHA1) to be
used, principally for CentOS 6 targets. This can be removed if/when support
for older (legacy) targets is dropped.

Only the test suite enables this known weak alogorithm. Mitogen as-shipped
doesn't enable or disable algorithms.
2023-07-29 00:26:26 +01:00
Alex Willmer 8151577b75 CI: Limit to Tox < 4.0 to avoid plugin incompatibility
I'm abandoning tox-factor because having any [tox] requires = ... causes tox
3.x to create an isolated virtualenv for running tox itself. Since Tox 4.x was
released that virtualenv gets it, which is incompatible with the tox-factor
plugin.
e.g.
```
Traceback (most recent call last):
File
"/Users/runner/work/1/s/.tox/.tox/lib/python3.10/site-packages/tox_factor/compat.py",
line 2, in <module>
    from tox.config.parallel import ENV_VAR_KEY_PUBLIC as TOX_PARALLEL_ENV
ModuleNotFoundError: No module named 'tox.config.parallel'
```
2023-02-05 16:22:35 +00:00
Alex Willmer e8ad12e881 Ansible 6 support
fixes #929
2022-07-24 10:14:50 +01:00
Alex Willmer db114d3bb2 ci: Bump Ansible releases used in tests 2022-07-24 10:14:50 +01:00
Alex Willmer 63e39c1ac5 ci: Remove traces of Ansible < 2.10 (not supported in 0.3.x) 2022-07-24 10:14:50 +01:00
Alex Willmer db0ffae352 tests: Enable stricter error handling, fix resulting failures 2022-07-17 13:44:05 +01:00
Alex Willmer 2a95d039ab Python 3.10 support 2022-04-20 17:54:12 +01:00
Alex Willmer ccca77bcc0 tests: Fix old Ansible dependencies installed by Tox 2022-04-20 16:12:03 +01:00
Alex Willmer 63543b3b83 tests: Skip heavy & sudo Ansible tests by default
We don't wish to modify someone's local OS, or rely on them having sudo (with
or without password).
2022-04-20 14:15:08 +01:00
Alex Willmer c9318a26f6 tests: Suppress pip version warnings 2022-04-20 14:10:40 +01:00
Alex Willmer 491458673b tests: Manage ANSIBLE_STRATEGY with Tox 2022-04-20 14:06:10 +01:00
Klaus Zerwes b9782ded9c run ansible 5 tests only w/ py39 2021-12-08 23:47:28 +01:00
Klaus Zerwes 13af356bc9 issue #874 tox.ini : fixed ansible5 definition 2021-12-08 14:13:25 +01:00
Klaus Zerwes 40fc1f8a25 issue #874 try to implement the testst for ansible 2.12 2021-12-08 13:52:13 +01:00
Alex Willmer c61c063b4f Support for Ansible 3 & 4
fixes #834

Co-authored-by: Claude Becker (@upekkha)
Co-authored-by: Dolph Mathews (@dolph)
2021-11-12 22:10:53 +00:00
Alex Willmer c5c65ab0d2 ci: Switch Continuous Integration to Tox
Also
 - Simplifies adding support for additional Ansible versions
 - Unifies Python package versioning in CI and local test environments
 - Matches Python versions tested, with those declared in setup.py
 - Expands targets covered by automated Ansible tests to
    - centos6, centos8
    - debian9, debian11
    - ubuntu1604, ubuntu2004
2021-11-10 20:17:53 +00:00
Alex Willmer 6f28e11618 tests: Add Tox environments for debian 10, 11; centos 8; ubuntu 2021-02-21 20:56:59 +00:00
Alex Willmer a64e966ab9 tests: Add unofficial Tox environments for Ansible tests
These are not part of the official testing regime (tests run for pull
requests). I find them convenient for local development.

Limitations
- Python 2.7+ only. No Python 2.4, 2.5, or 2.6.
- Requires Pythons pre-installed (e.g. DeadSnakes, pyenv)
- No coverage of alternate controller OS (e.g. MacOS)

The environments tested by default are

py27-mode_ansible-ansible2.10
py36-mode_ansible-ansible2.10
py39-mode_ansible-ansible2.10
py27-mode_mitogen
py36-mode_mitogen
py39-mode_mitogen
py27-mode_mitogen-distro_centos7
py36-mode_mitogen-distro_centos7
py39-mode_mitogen-distro_centos7
2021-01-18 21:52:22 +00:00
Alex Willmer 2fa84e096f Aggregate code coverage data across tox all runs
Fixes #529
2019-02-09 20:03:29 +00:00
David Wilson fe745779ba Use develop mode in tox 2019-01-29 06:01:48 +00:00
David Wilson 9f7db66f67 tox: add py37 target. 2019-01-27 19:54:07 +00:00
David Wilson c286f4f107 Add tests/ansible/requirements.txt to Tox. 2018-11-05 13:00:47 +00:00
Alex Willmer 67f26434cb tests: Run tests on CPython 3.5 and 3.6 with Tox
Python 3.0 to 3.4 are excluded because no version of Ansible supports
them. Due to their setup.py declarations pip refuses to install Ansible
on these versions of Python.
2018-10-03 00:15:47 +01:00
Alex Willmer c4899a0ce4 Fix invocation of test runner by tox
I think tox calls it in a way that #! is ignored
2018-06-18 19:43:50 +01:00
Alex Willmer dc60f05a40 tests: Switch to unit2 test runner, with coverage
This means test files are imported as modules, not run as scripts. THey
can still be run individually if so desired. Test coverage is measured,
and an html report generated in htmlcov/. Test cases are automativally
discovered, so they need not be listed twice. An overall
passed/failed/skipped summary is printed, rather than for each file.

Arguments passed to ./test are passed on to unit2. For instance

    ./test -v

will print each test name as it is run.
2018-04-01 01:43:45 +01:00
Alex Willmer 7063d172e9 tests: Add Tox config for Python 2.6 and 2.7
I could not get Python 2.5 or earlier to work. Too many packages
(critically docker) don't support it.
2018-03-19 21:58:34 +05:45