]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
tests: Add tests for the new 'restart' feature
authorPaul Bonaud <paul.bonaud@fretlink.com>
Tue, 23 Jun 2020 08:52:52 +0000 (10:52 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Tue, 23 Jun 2020 08:52:52 +0000 (10:52 +0200)
.travis.yml
tests/test-all.yml [new file with mode: 0644]
tests/test-restart-app.yml [new file with mode: 0644]

index 92f6295cf48d8ceaf869d533a17b99479a88fffa..7ce4540ee5c587a504d15499c6adb702ad6baf1e 100644 (file)
@@ -26,10 +26,7 @@ script:
   - mkdir -p ~/.local/bin
   - cp tests/fake.sh ~/.local/bin/clever
   - cp tests/fake.sh ~/.local/bin/git
-  - ansible-playbook tests/test-simple-app.yml -i tests/inventory
-  - ansible-playbook tests/test-haskell-app.yml -i tests/inventory
-  - ansible-playbook tests/test-configure-app.yml -i tests/inventory
-  - ansible-playbook tests/test-scalability.yml -i tests/inventory
+  - ansible-playbook -i tests/inventory tests/test-all.yml
 
 notifications:
   slack: fretlink:pTIylIN7zkwRFuL3aHERmsbB
diff --git a/tests/test-all.yml b/tests/test-all.yml
new file mode 100644 (file)
index 0000000..64eb239
--- /dev/null
@@ -0,0 +1,6 @@
+---
+- import_playbook: ./test-simple-app.yml
+- import_playbook: ./test-configure-app.yml
+- import_playbook: ./test-haskell-app.yml
+- import_playbook: ./test-scalability.yml
+- import_playbook: ./test-restart-app.yml
diff --git a/tests/test-restart-app.yml b/tests/test-restart-app.yml
new file mode 100644 (file)
index 0000000..09d9936
--- /dev/null
@@ -0,0 +1,11 @@
+---
+- name: Restart app on clever
+  hosts: localhost
+  remote_user: root
+  roles:
+    - role: clever
+      vars:
+        clever_token: 123abc
+        clever_secret: cba321
+        clever_app: app_00000000-0000-0000-0000-000000000000
+        clever_restart_only: true