aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-all.yml1
-rw-r--r--tests/test-noop-deploy.yml35
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/test-all.yml b/tests/test-all.yml
index 64eb239..145b16d 100644
--- a/tests/test-all.yml
+++ b/tests/test-all.yml
@@ -2,5 +2,6 @@
2- import_playbook: ./test-simple-app.yml 2- import_playbook: ./test-simple-app.yml
3- import_playbook: ./test-configure-app.yml 3- import_playbook: ./test-configure-app.yml
4- import_playbook: ./test-haskell-app.yml 4- import_playbook: ./test-haskell-app.yml
5- import_playbook: ./test-noop-deploy.yml
5- import_playbook: ./test-scalability.yml 6- import_playbook: ./test-scalability.yml
6- import_playbook: ./test-restart-app.yml 7- import_playbook: ./test-restart-app.yml
diff --git a/tests/test-noop-deploy.yml b/tests/test-noop-deploy.yml
new file mode 100644
index 0000000..13eed20
--- /dev/null
+++ b/tests/test-noop-deploy.yml
@@ -0,0 +1,35 @@
1---
2- name: Do nothing if the app is up-to-date on clever
3 hosts: localhost
4 remote_user: root
5 pre_tasks:
6 - file:
7 state: absent
8 path: ../clever-commands
9 roles:
10 - role: clever
11 vars:
12 clever_token: 123abc
13 clever_secret: cba321
14 clever_app: app_00000000-0000-0000-0000-000000000000
15 environment:
16 PRETEND_REMOTE_COMMIT: aaa000aaa000aaa000aaa000aaa000aaa000aaa0
17 post_tasks:
18 - name: Check stubbed commands
19 shell: "{{ item.cmd }}"
20 ignore_errors: true
21 with_list:
22 - cmd: "! grep deploy ../clever-commands"
23 display: "Expected 'clever deploy' command to NOT be called"
24 vars:
25 display: "{{ item.display }}"
26 register: tests_results
27 - name: show results
28 debug:
29 msg:
30 - "failed_results: {{ failed_results }}"
31 - "success_results: {{ success_results }}"
32 failed_when: tests_results is failed
33 vars:
34 failed_results: "{{ tests_results.results | selectattr('failed') | map(attribute='item.display') | list }}"
35 success_results: "{{ tests_results.results | rejectattr('failed') | map(attribute='item.display') | list }}"