ansible/test/units
Felix Fontein ea04e0048d
Allow to deprecate options and aliases by date (#68177)
* Allow to deprecate options and aliases by date instead of only by version.

* Update display.deprecate().

* Adjust behavior to conform to tested behavior, extend tests, and improve C# style.

* Parse date and fail on invalid date.

This is mainly to make sure that people start using invalid dates, and we eventually have a mess to clean up.

* C# code: improve validation and update/extend tests.

* Make sure that deprecate() is not called with both date and version.

* Forgot to remove no longer necessary formatting.

* Adjust order of warnings in C# code.

* Adjust unrelated test.

* Fix grammar (and make that test pass).

* Don't parse date, and adjust message to be same as in #67684.

* Sanity tests: disable date in past test.

* Validate-modules: validate ISO 8601 date format.

* Validate-modules: switch schema declaration for deprecated_aliases to improve error messages for invalid dates.

* Use DateTime instead of string for date deprecation.

* Validate that date in deprecated_aliases is actually a DateTime.

* Fix tests.

* Fix rebasing error.

* Adjust error codes for pylint, and add removed_at_date and deprecated_aliases.date checks to validate-modules.

* Make deprecation date in the past error codes optional.

* Make sure not both version and date are specified for AnsibleModule.deprecate() calls.

* Stop using Python 3.7+ API.

* Make sure errors are actually reported. Re-add 'ansible-' prefix.

* Avoid crashing when 'name' isn't there.

* Linting.

* Update lib/ansible/module_utils/csharp/Ansible.Basic.cs

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Adjust test to latest change.

* Prefer date over version if both end up in Display.deprecated().

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2020-05-26 20:23:56 -04:00
..
ansible_test Add Shippable request signing to ansible-test. (#69526) 2020-05-15 15:38:02 -07:00
cli Unify ansible-galaxy install -r (#67843) 2020-05-19 05:09:42 +10:00
compat
config Fix inline vaults for plugins in ensure_type (#67492) 2020-02-25 10:42:31 -05:00
errors Remove empty overridden unittest.setUp and unittest.tearDown methods. 2019-11-05 09:12:11 -08:00
executor Fix filedescriptor out of range in select() when running commands (#65058) 2020-05-14 11:46:34 -04:00
galaxy Add multipart/form-data functionality (#69376) 2020-05-20 15:44:01 -05:00
inventory Clean up unit tests to assist with migration. (#67875) 2020-02-28 20:29:41 -08:00
inventory_test_data/group_vars
mock Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
module_utils Allow to deprecate options and aliases by date (#68177) 2020-05-26 20:23:56 -04:00
modules Flatten the directory hierarchy of modules (#68966) 2020-05-13 19:14:53 -07:00
parsing Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
playbook Make sure collection is a list if a str is given (#69081) 2020-04-28 10:47:11 -05:00
plugins Add FQCN mappings for network facts modules (#69601) 2020-05-22 23:20:21 +05:30
regex Add toggle to control invalid character substitution in group names (#52748) 2019-03-06 11:49:40 -05:00
template Do not treat AnsibleUndefined as being unsafe (#65202) 2019-11-25 15:06:29 +01:00
utils fix delegated loading when path is not a directory (#69713) 2020-05-26 15:55:17 -07:00
vars Remove empty setUp/tearDown/tearDownClass methods in test classes. 2019-11-06 08:14:29 -08:00
__init__.py
requirements.txt Remove unnecessary unit test requirements. 2020-03-23 11:14:21 -05:00
test_constants.py
test_context.py Unit tests: remove unused imports (#59740) 2019-07-29 22:10:13 +02:00