Bump version to 2.0.0 (#1369)

* Bump version to 2.0.0.

* Remove deprecated 2.0.0 features.

* Test for failure.

* Fix cache plugin unit tests.

* Accept direct import only for Ansible 2.9.
This commit is contained in:
Felix Fontein 2020-11-26 14:26:36 +01:00 committed by GitHub
commit 1db167b12a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 50 deletions

View file

@ -19,24 +19,19 @@
- get_element_attribute.matches[0]['rating'] is defined
- get_element_attribute.matches[0]['rating']['subjective'] == 'true'
# TODO: Remove this in 2.0.0 when this incorrect use of attribute is deprecated
- name: Get element attributes
- name: Get element attributes (should fail)
xml:
path: /tmp/ansible-xml-beers.xml
xpath: /business/rating
content: attribute
attribute: subjective
register: get_element_attribute_wrong
ignore_errors: true
- name: Test expected result
assert:
that:
- get_element_attribute_wrong.changed == false
- get_element_attribute_wrong.matches[0]['rating'] is defined
- get_element_attribute_wrong.matches[0]['rating']['subjective'] == 'true'
- get_element_attribute_wrong.deprecations is defined
- get_element_attribute_wrong.deprecations[0].msg == "Parameter 'attribute=subjective' is ignored when using 'content=attribute' only 'xpath' is used. Please remove entry."
- get_element_attribute_wrong.deprecations[0].version == '2.0.0'
- get_element_attribute_wrong is failed
- name: Get element text
xml:

View file

@ -28,8 +28,4 @@ from ansible_collections.community.general.plugins.cache.memcached import CacheM
def test_memcached_cachemodule():
assert isinstance(MemcachedCache(), MemcachedCache)
def test_memcached_cachemodule_with_loader():
assert isinstance(cache_loader.get('community.general.memcached'), MemcachedCache)

View file

@ -28,9 +28,5 @@ from ansible_collections.community.general.plugins.cache.redis import CacheModul
def test_redis_cachemodule():
assert isinstance(RedisCache(), RedisCache)
def test_redis_cachemodule_with_loader():
# The _uri option is required for the redis plugin
assert isinstance(cache_loader.get('community.general.redis', **{'_uri': '127.0.0.1:6379:1'}), RedisCache)