Add tests for deprecations (#84284)

* Check for module deprecation
* Check for module option deprecation
* Check for plugin deprecation

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/84303/head
Abhijeet Kasurde 2 weeks ago committed by GitHub
parent e404bc17f7
commit ca0810da85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,6 +9,10 @@ DOCUMENTATION = """
description: This cache uses is NOT JSON
author: Ansible Core (@ansible-core)
version_added: 0.7.0
deprecated:
alternative: cause I need to test it
why: Test deprecation
version: '2.0.0'
options:
_uri:
required: True

@ -34,6 +34,11 @@ export ANSIBLE_CACHE_PLUGIN=notjsonfile
# check for plugin(s) config option deprecation
[ "$(ANSIBLE_NOTJSON_CACHE_PLUGIN_REMOVEME=1 ansible -m meta -a 'noop' localhost --playbook-dir ./ 2>&1 | grep -c 'DEPRECATION')" -eq "1" ]
# TODO: check for module deprecation
# TODO: check for module option deprecation
# TODO: check for plugin deprecation
# check for the module deprecation
[ "$(ansible-doc willremove --playbook-dir ./ | grep -c 'DEPRECATED')" -eq "1" ]
# check for the module option deprecation
[ "$(ansible-doc removeoption --playbook-dir ./ | grep -c 'deprecated:')" -eq "1" ]
# check for plugin deprecation
[ "$(ansible-doc -t cache notjsonfile --playbook-dir ./ | grep -c 'DEPRECATED:')" -eq "1" ]

Loading…
Cancel
Save