mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
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:
parent
25c52d56bd
commit
1db167b12a
9 changed files with 21 additions and 50 deletions
|
@ -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:
|
||||
|
|
4
tests/unit/plugins/cache/test_memcached.py
vendored
4
tests/unit/plugins/cache/test_memcached.py
vendored
|
@ -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)
|
||||
|
|
4
tests/unit/plugins/cache/test_redis.py
vendored
4
tests/unit/plugins/cache/test_redis.py
vendored
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue