aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test-configure-app.yml
diff options
context:
space:
mode:
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>2020-06-23 11:20:46 +0200
committerGitHub <noreply@github.com>2020-06-23 11:20:46 +0200
commitca1a71c946fa7c51e0059b8d4342b24507aa8c64 (patch)
treed3a0759aee49d8aa595417a88e20978f6f6586c3 /tests/test-configure-app.yml
parent44af02cef61e043b971f03aa5cec5a4caa6d6875 (diff)
parent4525f9489fe792b0d7ee4ca76dc0c3706784d256 (diff)
downloadansible-clever-ca1a71c946fa7c51e0059b8d4342b24507aa8c64.tar.gz
ansible-clever-ca1a71c946fa7c51e0059b8d4342b24507aa8c64.tar.zst
ansible-clever-ca1a71c946fa7c51e0059b8d4342b24507aa8c64.zip
Merge pull request #70 from paulrbr-fl/clever-restart
feature: add a new 'clever_restart_only' flag to restart an app
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 }}"