Commit Graph

24 Commits (04e0f9d4ea849bdd55de99a70da99a4f12595fe1)

Author SHA1 Message Date
Matt Clay 92380d7050
Update ansible-test --windows inventory creation. (#60911)
Host specific settings are created as part of the generated inventory instead of using a host_vars directory.

Also update connection tests to work properly with the generated inventory changes.
5 years ago
Matt Clay ebe55e83c3 Fix ansible-test bin creation.
Use symlink instead of link.
5 years ago
Matt Martz def3d1f815
validate-modules: support collections (#60247)
* Start of work to support collections

* remove version_added from base schema

* If a collection, pass that to validate-modules

* clean ups

* Allow version_added in a collection, just make it optional

* Don't traceback on missing doc_fragment

* Don't validate metadata in a collection
5 years ago
Matt Clay d9c44897a6 Fix ansible-test cloud vars overwrite. 5 years ago
Matt Clay 7968dc4c00 Load integration config test vars from content.
The `test/integration/integration_config.yml` vars file will now be loaded from the content under test and is now optional.

The `output_dir` and `win_output_dir` vars are now provided by ansible-test.
5 years ago
Matt Clay ba1b4565d3 Clean up ansible-test results path handling.
This brings us closer to being able to use `tests/` instead of `test/` in collections.
5 years ago
Matt Clay 1b8aa798df
Update ansible-test integration config handling. (#60448)
* Move Ansible test config into env vars.

This allows ansible-test to use an empty Ansible config file, leaving open the option for users to customize the one used to run tests (although such usage is discouraged).

* Use config from content under test when present.
5 years ago
Matt Clay 25d396fdfc Fix testing of Windows binary modules. 5 years ago
Gonéri Le Bouder a3407682ed ansible-test: fix the vcenter+vcsim support
The vcenter provider allow one to use the `VMWARE_TEST_PLATFORM` to
manually select a test platform. The test platforms are:

- `govcsim`
- `static`
- and `worldstream`.

Before this commit, the `govcsim` value was ignored.

Example:

```shell
$ VMWARE_TEST_PLATFORM=govcsim ansible-test integration --python 3.7 needs/target/prepare_vmware_tests/
```
5 years ago
Matt Clay 3fac6a0adb Fix ansible-test TypeVar type annotations. 5 years ago
Matt Clay cb68110296
Clean up ansible-test inventory templates. (#60321)
* Move ansible-test inventory templates.
* Remove obsolete inventoy.remote.template file.
5 years ago
Matt Clay 2a9964ede8
Code cleanup in ansible-test. (#60318)
* Move ansible-test units code into separate dir.
* Fix --explain on "code smell" sanity tests.
* Add --strict-markers to pytest invoctaion.
* Fix classification of units code changes.
5 years ago
Matt Clay df59f06d6a
Additional ansible-test path fixes. (#60300)
* Add missing ansible-test injector symlink.
* More ansible-test path fixes.
* Expand bin-symlinks docs.
5 years ago
Matt Clay 39b3fc0926 Update ansible-test layout and payload handling. 5 years ago
Abhijeet Kasurde 647b78a09c
VMware: Check if datastore is valid (#58872)
Check validation of datastore selected using autoselect_datastore API.

Fixes: #58541

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay 57dc7ec265
Prepare ansible-test for inclusion in setup.py (#60294)
* Cache ansible version lookup.
* Fix method of determining ANSIBLE_ROOT.
* Clean up based on PyCharm inspections.
* Generate minimal PKG-INFO without setup.py.
* Use ANSIBLE_LIB_ROOT where possible.
* Use import instead of subprocess to get version.
* Fix install layout type.
* Correct required paths message for installs.
* Update list of files copied during delegation.
* Fix ansible-test entry point.
* Fix pylint issue.
* Fix version lookup on Python 2.x.
* Fix pylint issue.
* Remove unwanted print statement.
5 years ago
Matt Clay 5f67b5a757 Move ansible-test coverage config to test/lib/ 5 years ago
Matt Clay 2e7d36a3f9
Fix placement and handling of ansible-test cloud config (#60253)
* Move cloud templates.
* Update paths for cloud config templates.
* Fix cloud config paths.
* Fix cloud-config classification.
5 years ago
Matt Clay 278044358c Split up ansible-test sanity test requirements. 5 years ago
Matt Clay a93a0c8fd6
Relocate validate-modules for easier testing. (#60214)
* Relocate module validator code and tests.
* Fix validate-modules entry point and imports.
* Fix paths and test entry points.
* Fix up unit tests.
* Fix shebang and execute bit.
5 years ago
Matt Clay 18867847f4
Split up "code smell" sanity tests. (#60174)
* Relocate ansible-only sanity tests.

* Get "code smell" sanity tests from multiple dirs.

- `test/lib/ansible_test/_data/sanity/code-smell/` - General purpose tests used for both Ansible and Ansible Collections.
- `test/sanity/code-smell/` - Tests specific to Ansible, will not be used for Ansible Collections.
5 years ago
Matt Clay 709a8c5026 Fix ansible-test classification of sanity changes. 5 years ago
Matt Clay 9da5908afb Fix ansible-test layout path generation. 5 years ago
Matt Clay d651bda123
Relocate ansible-test code. (#60147)
* Initial move of `test/runner/` content.

`test/runner/lib/` -> `test/lib/ansible_test/_internal/`
`test/runner/`     -> `test/lib/ansible_test/_internal/data/`

* Initial move of `test/sanity/` content.

`test/sanity/` -> `test/lib/ansible_test/_internal/data/sanity/` (except `test/sanity/ignore.txt`)

* Initial move of `test/units/pytest/` content.

`test/units/pytest/` -> `test/lib/ansible_test/_internal/data/pytest/`

* Follow-up move of `test/runner/unit/` content.

`test/lib/ansible_test/_internal/data/unit/` -> `test/lib/ansible_test/tests/unit/`

* Initial move of `ansible.cfg` content.

`test/units/ansible.cfg` -> `test/lib/ansible_test/_internal/data/units/ansible.cfg`
`test/env/ansible.cfg` -> `test/lib/ansible_test/_internal/data/env/ansible.cfg`

* Follow-up move of `data` directory.

`test/lib/ansible_test/_internal/data/` -> `test/lib/ansible_test/_data/`

* Update import statements.

* Add missing __init__.py for unit tests.

* Fix path references and miscellaneous issues.
5 years ago