summaryrefslogtreecommitdiff
path: root/test/integration/targets/copy
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2017-11-27 16:58:08 -0600
committeransibot <ansibot@users.noreply.github.com>2017-11-27 17:58:08 -0500
commit4fe08441be093a9cbe968e00606e03e33605207c (patch)
treef41c0383cdd50e08e2744468e54a7a9bb15035f9 /test/integration/targets/copy
parentfd4a6cf7ad7012a07b29096f5c70f34499af1216 (diff)
downloadansible-4fe08441be093a9cbe968e00606e03e33605207c.tar.gz
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
Diffstat (limited to 'test/integration/targets/copy')
-rw-r--r--test/integration/targets/copy/tasks/dest_in_non_existent_directories.yml4
-rw-r--r--test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml2
-rw-r--r--test/integration/targets/copy/tasks/tests.yml34
3 files changed, 20 insertions, 20 deletions
diff --git a/test/integration/targets/copy/tasks/dest_in_non_existent_directories.yml b/test/integration/targets/copy/tasks/dest_in_non_existent_directories.yml
index 12fec50795..c86caa1e74 100644
--- a/test/integration/targets/copy/tasks/dest_in_non_existent_directories.yml
+++ b/test/integration/targets/copy/tasks/dest_in_non_existent_directories.yml
@@ -14,8 +14,8 @@
- name: assert copy worked
assert:
that:
- - 'copy_result|success'
- - 'copy_result|changed'
+ - 'copy_result is successful'
+ - 'copy_result is changed'
- name: stat copied file
stat:
diff --git a/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml b/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml
index 9c90ad3199..f4ab9998a6 100644
--- a/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml
+++ b/test/integration/targets/copy/tasks/src_file_dest_file_in_non_existent_dir.yml
@@ -13,7 +13,7 @@
- name: Assert copy failed
assert:
that:
- - 'copy_result|failed'
+ - 'copy_result is failed'
- name: Stat dest path
stat:
diff --git a/test/integration/targets/copy/tasks/tests.yml b/test/integration/targets/copy/tasks/tests.yml
index e030935b74..902ebf6148 100644
--- a/test/integration/targets/copy/tasks/tests.yml
+++ b/test/integration/targets/copy/tasks/tests.yml
@@ -108,7 +108,7 @@
- name: Assert that the file was not changed
assert:
that:
- - "not copy_result2|changed"
+ - "copy_result2 is not changed"
- name: Overwrite the file using the content system
copy:
@@ -129,7 +129,7 @@
- name: Assert that the file has changed
assert:
that:
- - "copy_result3|changed"
+ - "copy_result3 is changed"
- "'content' not in copy_result3"
- "stat_results.stat.checksum == ('modified'|hash('sha1'))"
- "stat_results.stat.mode != '0700'"
@@ -154,7 +154,7 @@
- name: Assert that the file has changed
assert:
that:
- - "copy_result3|changed"
+ - "copy_result3 is changed"
- "'content' not in copy_result3"
- "stat_results.stat.checksum == ('modified'|hash('sha1'))"
- "stat_results.stat.mode == '0700'"
@@ -269,7 +269,7 @@
- name: Assert that empty source failed
assert:
that:
- - failed_copy | failed
+ - failed_copy is failed
- "'src (or content) is required' in failed_copy.msg"
- name: Try without destination to ensure it fails
@@ -285,7 +285,7 @@
- name: Assert that missing destination failed
assert:
that:
- - failed_copy | failed
+ - failed_copy is failed
- "'dest is required' in failed_copy.msg"
- name: Try without source to ensure it fails
@@ -301,7 +301,7 @@
- name: Assert that missing source failed
assert:
that:
- - failed_copy | failed
+ - failed_copy is failed
- "'src (or content) is required' in failed_copy.msg"
- name: Try with both src and content to ensure it fails
@@ -315,7 +315,7 @@
- name: Assert that mutually exclusive parameters failed
assert:
that:
- - failed_copy | failed
+ - failed_copy is failed
- "'mutually exclusive' in failed_copy.msg"
- name: Try with content and directory as destination to ensure it fails
@@ -332,7 +332,7 @@
- name: Assert that content and directory as destination failed
assert:
that:
- - failed_copy | failed
+ - failed_copy is failed
- "'can not use content with a dir as dest' in failed_copy.msg"
- name: Clean up
@@ -359,7 +359,7 @@
- name: Assert that the file has changed
assert:
that:
- - "copy_results|changed"
+ - "copy_results is changed"
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
- "stat_results.stat.mode == '0500'"
@@ -386,7 +386,7 @@
- name: Assert that the file has changed and has correct mode
assert:
that:
- - "copy_results|changed"
+ - "copy_results is changed"
- "copy_results.mode == '0547'"
- "stat_results.stat.checksum == ('foo.txt\n'|hash('sha1'))"
- "stat_results.stat.mode == '0547'"
@@ -437,7 +437,7 @@
- name: Assert that the recursive copy did something
assert:
that:
- - "recursive_copy_result|changed"
+ - "recursive_copy_result is changed"
- name: Check that a file in a directory was transferred
stat:
@@ -547,7 +547,7 @@
- name: Assert that the second copy did not change anything
assert:
that:
- - "not recursive_copy_result|changed"
+ - "recursive_copy_result is not changed"
- name: Cleanup the recursive copy subdir
file:
@@ -594,7 +594,7 @@
- name: Assert that the recursive copy did something
assert:
that:
- - "recursive_copy_result|changed"
+ - "recursive_copy_result is changed"
- name: Check that a file in a directory was transferred
stat:
@@ -702,7 +702,7 @@
- name: Assert that the second copy did not change anything
assert:
that:
- - "not recursive_copy_result|changed"
+ - "recursive_copy_result is not changed"
- name: Cleanup the recursive copy subdir
file:
@@ -749,7 +749,7 @@
- name: Assert that the recursive copy did something
assert:
that:
- - "recursive_copy_result|changed"
+ - "recursive_copy_result is changed"
- name: Check that a file in a directory was transferred
stat:
@@ -867,7 +867,7 @@
- name: Assert that the second copy did not change anything
assert:
that:
- - "not recursive_copy_result|changed"
+ - "recursive_copy_result is not changed"
- name: Cleanup the recursive copy subdir
file:
@@ -1153,7 +1153,7 @@
- name: Assert that the file has changed and is not a link
assert:
that:
- - "copy_results|changed"
+ - "copy_results is changed"
- "'content' not in copy_results"
- "stat_results.stat.checksum == ('modified'|hash('sha1'))"
- "not stat_results.stat.islnk"