mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Deprecate tests used as filters (#32361)
* Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
- name: DEPTH | make sure the old commit was not fetched
|
||||
assert:
|
||||
that: 'checkout_early.rc != 0'
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
# tests https://github.com/ansible/ansible/issues/14954
|
||||
- name: DEPTH | fetch repo again with depth=1
|
||||
@@ -32,8 +32,8 @@
|
||||
register: checkout2
|
||||
|
||||
- assert:
|
||||
that: "not checkout2|changed"
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
that: "checkout2 is not changed"
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
- name: DEPTH | again try to access earlier commit
|
||||
shell: "git checkout {{git_shallow_head_1.stdout}}"
|
||||
@@ -45,7 +45,7 @@
|
||||
- name: DEPTH | again make sure the old commit was not fetched
|
||||
assert:
|
||||
that: 'checkout_early.rc != 0'
|
||||
when: git_version.stdout | version_compare(git_version_supporting_depth, '>=')
|
||||
when: git_version.stdout is version(git_version_supporting_depth, '>=')
|
||||
|
||||
# make sure we are still able to fetch other versions
|
||||
- name: DEPTH | Clone same repo with older version
|
||||
@@ -57,7 +57,7 @@
|
||||
register: cloneold
|
||||
|
||||
- assert:
|
||||
that: cloneold | success
|
||||
that: cloneold is successful
|
||||
|
||||
- name: DEPTH | try to access earlier commit
|
||||
shell: "git checkout {{git_shallow_head_1.stdout}}"
|
||||
@@ -79,7 +79,7 @@
|
||||
register: cloneold
|
||||
|
||||
- assert:
|
||||
that: cloneold | success
|
||||
that: cloneold is successful
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
file:
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
- name: DEPTH | ensure the fetch succeeded
|
||||
assert:
|
||||
that: git_fetch | success
|
||||
that: git_fetch is successful
|
||||
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
- name: DEPTH | ensure the fetch succeeded
|
||||
assert:
|
||||
that: git_fetch | success
|
||||
that: git_fetch is successful
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
file:
|
||||
@@ -165,7 +165,7 @@
|
||||
assert:
|
||||
that:
|
||||
- "{{ lookup('file', checkout_dir+'/a' )}} == 3"
|
||||
- git_fetch | changed
|
||||
- git_fetch is changed
|
||||
|
||||
- name: DEPTH | clear checkout_dir
|
||||
file:
|
||||
|
||||
Reference in New Issue
Block a user