aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test-configure-app.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-configure-app.yml')
-rw-r--r--tests/test-configure-app.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test-configure-app.yml b/tests/test-configure-app.yml
index 06e5e92..15987fd 100644
--- a/tests/test-configure-app.yml
+++ b/tests/test-configure-app.yml
@@ -2,6 +2,10 @@
2- name: Deploy an app & configure system details on clever 2- name: Deploy an app & configure system details on clever
3 hosts: localhost 3 hosts: localhost
4 remote_user: root 4 remote_user: root
5 pre_tasks:
6 - file:
7 state: absent
8 path: ../clever-commands
5 roles: 9 roles:
6 - role: clever 10 - role: clever
7 vars: 11 vars:
@@ -16,3 +20,29 @@
16 fail: 20 fail:
17 msg: "CC_RUN_COMMAND env variable should not be present in the environment dict" 21 msg: "CC_RUN_COMMAND env variable should not be present in the environment dict"
18 when: clever_env.CC_RUN_COMMAND is defined 22 when: clever_env.CC_RUN_COMMAND is defined
23 - name: Check stubbed commands
24 command: "{{ item.cmd }}"
25 ignore_errors: true
26 vars:
27 display: "{{ item.display }}"
28 with_list:
29 - cmd: "grep deploy ../clever-commands"
30 display: "Expected 'clever deploy' command to be called"
31 - cmd: "grep scale ../clever-commands"
32 display: "Expected 'clever scale' command to be called"
33 - cmd: "grep domain ../clever-commands"
34 display: "Expected 'clever domain' command to be called"
35 - cmd: "grep drain ../clever-commands"
36 display: "Expected 'clever drain' command to be called"
37 - cmd: "grep -v restart ../clever-commands"
38 display: "Expected 'clever restart' command to NOT be called"
39 register: tests_results
40 - name: show results
41 debug:
42 msg:
43 - "failed_results: {{ failed_results }}"
44 - "success_results: {{ success_results }}"
45 failed_when: tests_results is failed
46 vars:
47 failed_results: "{{ tests_results.results | selectattr('failed') | map(attribute='item.display') | list }}"
48 success_results: "{{ tests_results.results | rejectattr('failed') | map(attribute='item.display') | list }}"