Implement regression test for invalid spec definition

pull/1/head
bom 1 year ago
parent 67c2fb4af7
commit e53dfc01aa

@ -21,6 +21,24 @@
:grafana-cloud-password "password"
:hetzner-cloud-ro-token "ro-token"})
(def invalid-conf {:cluster-name "clustername"
:cluster-stage :test
:grafana-clud-url "https://some.url/with/path"})
(def invalid-auth {:grafana-cloud-user "user"
:grafana-clod-password "password"
:hetzner-cloud-ro-token "ro-token"})
(deftest should-not-generate-config
(is (thrown?
Exception
(cut/generate-config invalid-conf auth))))
(deftest should-not-generate-auth
(is (thrown?
Exception
(cut/generate-config conf invalid-auth))))
(deftest should-generate
(is (= 17
(count (cut/generate conf auth)))))

Loading…
Cancel
Save