]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
add tests for scalability settings 67/head
authorClement Delafargue <clement.delafargue@fretlink.com>
Mon, 22 Jun 2020 09:30:43 +0000 (11:30 +0200)
committerClement Delafargue <clement.delafargue@fretlink.com>
Mon, 22 Jun 2020 12:41:27 +0000 (14:41 +0200)
They make sure that ansible does not crash while calling `clever scale`

.travis.yml
tests/test-scalability.yml [new file with mode: 0644]

index 752366ff80d14db02d0923cf33d97ed87a9895ca..d287c26255826fb7b9a9c0c65afab7e9a586795f 100644 (file)
@@ -30,6 +30,7 @@ script:
   - 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
 
 notifications:
   slack: fretlink:pTIylIN7zkwRFuL3aHERmsbB
diff --git a/tests/test-scalability.yml b/tests/test-scalability.yml
new file mode 100644 (file)
index 0000000..fefc86c
--- /dev/null
@@ -0,0 +1,37 @@
+---
+- name: Configure scalability (fixed instances and ranged flavors)
+  hosts: localhost
+  remote_user: root
+  roles:
+    - role: clever
+      vars:
+        clever_token: 123abc
+        clever_secret: cba321
+        clever_app: app_00000000-0000-0000-0000-000000000000
+        clever_scaling:
+          instances: { fixed: 1 }
+          flavors: { min: "nano", max: "XS" }
+
+- name: Configure scalability (no instances and ranged flavors)
+  hosts: localhost
+  remote_user: root
+  roles:
+    - role: clever
+      vars:
+        clever_token: 123abc
+        clever_secret: cba321
+        clever_app: app_00000000-0000-0000-0000-000000000000
+        clever_scaling:
+          flavors: { min: "nano", max: "XS" }
+
+- name: Configure scalability (incomplete flavors)
+  hosts: localhost
+  remote_user: root
+  roles:
+    - role: clever
+      vars:
+        clever_token: 123abc
+        clever_secret: cba321
+        clever_app: app_00000000-0000-0000-0000-000000000000
+        clever_scaling:
+          flavors: { min: "nano" }