From db630aaa8b261503076eb7320ee3cee5a5582be8 Mon Sep 17 00:00:00 2001 From: Clement Delafargue Date: Tue, 30 Jun 2020 15:46:41 +0200 Subject: 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. --- tests/test-configure-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test-configure-app.yml') diff --git a/tests/test-configure-app.yml b/tests/test-configure-app.yml index 15987fd..e9861a2 100644 --- a/tests/test-configure-app.yml +++ b/tests/test-configure-app.yml @@ -21,7 +21,7 @@ msg: "CC_RUN_COMMAND env variable should not be present in the environment dict" when: clever_env.CC_RUN_COMMAND is defined - name: Check stubbed commands - command: "{{ item.cmd }}" + shell: "{{ item.cmd }}" ignore_errors: true vars: display: "{{ item.display }}" @@ -34,7 +34,7 @@ display: "Expected 'clever domain' command to be called" - cmd: "grep drain ../clever-commands" display: "Expected 'clever drain' command to be called" - - cmd: "grep -v restart ../clever-commands" + - cmd: "! grep restart ../clever-commands" display: "Expected 'clever restart' command to NOT be called" register: tests_results - name: show results -- cgit v1.2.3