Implement regression test for invalid spec definition
This commit is contained in:
parent
67c2fb4af7
commit
e53dfc01aa
1 changed files with 18 additions and 0 deletions
|
@ -21,6 +21,24 @@
|
||||||
:grafana-cloud-password "password"
|
:grafana-cloud-password "password"
|
||||||
:hetzner-cloud-ro-token "ro-token"})
|
: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
|
(deftest should-generate
|
||||||
(is (= 17
|
(is (= 17
|
||||||
(count (cut/generate conf auth)))))
|
(count (cut/generate conf auth)))))
|
||||||
|
|
Loading…
Reference in a new issue