aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test-restart-app.yml
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2020-06-30 15:46:41 +0200
committerClement Delafargue <clement.delafargue@fretlink.com>2020-06-30 16:26:19 +0200
commitdb630aaa8b261503076eb7320ee3cee5a5582be8 (patch)
tree3b1fa1a9e85d57dbf4f4071321f9011343f40ac6 /tests/test-restart-app.yml
parent545c41a6694ac5273dbfe1a0e119be04eaeef468 (diff)
downloadansible-clever-db630aaa8b261503076eb7320ee3cee5a5582be8.tar.gz
ansible-clever-db630aaa8b261503076eb7320ee3cee5a5582be8.tar.zst
ansible-clever-db630aaa8b261503076eb7320ee3cee5a5582be8.zip
fix(tests): use `! grep` instead of `grep -v`
`grep -v` makes sure a file contains other lines than the one that matched. This is different from `! grep` which makes sure the file does not contain a line that matched.
Diffstat (limited to 'tests/test-restart-app.yml')
-rw-r--r--tests/test-restart-app.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-restart-app.yml b/tests/test-restart-app.yml
index 4c13a14..bc880a8 100644
--- a/tests/test-restart-app.yml
+++ b/tests/test-restart-app.yml
@@ -15,16 +15,16 @@
15 clever_restart_only: true 15 clever_restart_only: true
16 post_tasks: 16 post_tasks:
17 - name: Check stubbed commands 17 - name: Check stubbed commands
18 command: "{{ item.cmd }}" 18 shell: "{{ item.cmd }}"
19 ignore_errors: true 19 ignore_errors: true
20 vars: 20 vars:
21 display: "{{ item.display }}" 21 display: "{{ item.display }}"
22 with_list: 22 with_list:
23 - cmd: "grep restart ../clever-commands" 23 - cmd: "grep restart ../clever-commands"
24 display: "Expected 'clever restart' command to be called" 24 display: "Expected 'clever restart' command to be called"
25 - cmd: "grep -v deploy ../clever-commands" 25 - cmd: "! grep deploy ../clever-commands"
26 display: "Expected 'clever deploy' command to NOT be called" 26 display: "Expected 'clever deploy' command to NOT be called"
27 - cmd: "grep -v scale ../clever-commands" 27 - cmd: "! grep scale ../clever-commands"
28 display: "Expected 'clever scale' command to NOT be called" 28 display: "Expected 'clever scale' command to NOT be called"
29 register: tests_results 29 register: tests_results
30 - name: show results 30 - name: show results