aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test-service-deps.yml
diff options
context:
space:
mode:
authorClément Delafargue <39330590+clementd-fretlink@users.noreply.github.com>2020-07-03 15:16:54 +0200
committerGitHub <noreply@github.com>2020-07-03 15:16:54 +0200
commit315c7f51af48b54719bd793d9d28a4bb396a926a (patch)
treea9e2e081805d89fa1b924d6b2f85be342fd0cc54 /tests/test-service-deps.yml
parent90634ee04cc1a4ab983de6bf142f25978463bc4a (diff)
parent3d3287e0767d13b0a81e5936ce9376d58f42e34c (diff)
downloadansible-clever-315c7f51af48b54719bd793d9d28a4bb396a926a.tar.gz
ansible-clever-315c7f51af48b54719bd793d9d28a4bb396a926a.tar.zst
ansible-clever-315c7f51af48b54719bd793d9d28a4bb396a926a.zip
Merge pull request #74 from clementd-fretlink/service-dependenciesv2.7
Service dependencies
Diffstat (limited to 'tests/test-service-deps.yml')
-rw-r--r--tests/test-service-deps.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/test-service-deps.yml b/tests/test-service-deps.yml
new file mode 100644
index 0000000..4e848e5
--- /dev/null
+++ b/tests/test-service-deps.yml
@@ -0,0 +1,36 @@
1---
2- name: Deploy an app & configure service dependencies 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 clever_service_dependencies:
16 - app_id: app_00000000-2222-2222-2222-000000000000
17 - addon_id: addon_00000000-0000-0000-0000-000000000000
18 post_tasks:
19 - name: Check stubbed commands
20 shell: "{{ item.cmd }}"
21 ignore_errors: true
22 vars:
23 display: "{{ item.display }}"
24 with_list:
25 - cmd: "grep service ../clever-commands"
26 display: "Expected 'clever service' command to be called"
27 register: tests_results
28 - name: show results
29 debug:
30 msg:
31 - "failed_results: {{ failed_results }}"
32 - "success_results: {{ success_results }}"
33 failed_when: tests_results is failed
34 vars:
35 failed_results: "{{ tests_results.results | selectattr('failed') | map(attribute='item.display') | list }}"
36 success_results: "{{ tests_results.results | rejectattr('failed') | map(attribute='item.display') | list }}"