Validate valid config/auth
This commit is contained in:
parent
151ab2a685
commit
0db2059c3f
3 changed files with 11 additions and 10 deletions
|
@ -5,14 +5,15 @@
|
||||||
:cljs [cljs.test :refer-macros [deftest is are testing run-tests]])
|
:cljs [cljs.test :refer-macros [deftest is are testing run-tests]])
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
[dda.c4k-common.yaml :as yaml]
|
[dda.c4k-common.yaml :as yaml]
|
||||||
[dda.c4k-taiga.core :as cut]
|
[dda.c4k-taiga.core :as cut]))
|
||||||
[clojure.spec.alpha :as s]))
|
|
||||||
|
|
||||||
#?(:cljs
|
#?(:cljs
|
||||||
(defmethod yaml/load-resource :website-test [resource-name]
|
(defmethod yaml/load-resource :website-test [resource-name]
|
||||||
(case resource-name
|
(case resource-name
|
||||||
|
"taiga-test/valid-config.yaml" (rc/inline "taiga-test/valid-config.yaml")
|
||||||
|
"taiga-test/valid-auth.yaml" (rc/inline "taiga-test/valid-auth.yaml")
|
||||||
(throw (js/Error. "Undefined Resource!")))))
|
(throw (js/Error. "Undefined Resource!")))))
|
||||||
|
|
||||||
(deftest validate-valid-resources
|
(deftest validate-valid-resources
|
||||||
;(is (s/valid? cut/config? (yaml/load-as-edn "website-test/valid-config.yaml")))
|
(is (s/valid? cut/config? (yaml/load-as-edn "taiga-test/valid-config.yaml")))
|
||||||
)
|
(is (s/valid? cut/auth? (yaml/load-as-edn "taiga-test/valid-auth.yaml"))))
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
taiga-secret-key: "some-key"
|
taiga-secret-key: "some-key"
|
||||||
postgres-db-user: "forgejo"
|
postgres-db-user: "forgejo"
|
||||||
postgres-db-password: "forgejo-db-password"
|
postgres-db-password: "forgejo-db-password"
|
||||||
mailer-user: ""
|
mailer-user: "mailer-user"
|
||||||
mailer-pw: ""
|
mailer-pw: "mailer-pw"
|
||||||
django-superuser-username: "taiga-admin"
|
django-superuser-username: "taiga-admin"
|
||||||
django-superuser-password: ""
|
django-superuser-password: "super-password"
|
||||||
django-superuser-email: "some@example.com"
|
django-superuser-email: "some@example.com"
|
||||||
rabbitmq-user: ""
|
rabbitmq-user: "rabbit-user"
|
||||||
rabbitmq-pw: ""
|
rabbitmq-pw: "rabbit-pw"
|
||||||
rabbitmq-erlang-cookie: ""
|
rabbitmq-erlang-cookie: "rabbit-erlang"
|
||||||
mon-auth:
|
mon-auth:
|
||||||
grafana-cloud-user: "user"
|
grafana-cloud-user: "user"
|
||||||
grafana-cloud-password: "password"
|
grafana-cloud-password: "password"
|
Loading…
Reference in a new issue