Validate valid config/auth

This commit is contained in:
bom 2023-08-25 12:47:11 +02:00
parent 151ab2a685
commit 0db2059c3f
3 changed files with 11 additions and 10 deletions

View file

@ -5,14 +5,15 @@
:cljs [cljs.test :refer-macros [deftest is are testing run-tests]])
[clojure.spec.alpha :as s]
[dda.c4k-common.yaml :as yaml]
[dda.c4k-taiga.core :as cut]
[clojure.spec.alpha :as s]))
[dda.c4k-taiga.core :as cut]))
#?(:cljs
(defmethod yaml/load-resource :website-test [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!")))))
(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"))))

View file

@ -1,14 +1,14 @@
taiga-secret-key: "some-key"
postgres-db-user: "forgejo"
postgres-db-password: "forgejo-db-password"
mailer-user: ""
mailer-pw: ""
mailer-user: "mailer-user"
mailer-pw: "mailer-pw"
django-superuser-username: "taiga-admin"
django-superuser-password: ""
django-superuser-password: "super-password"
django-superuser-email: "some@example.com"
rabbitmq-user: ""
rabbitmq-pw: ""
rabbitmq-erlang-cookie: ""
rabbitmq-user: "rabbit-user"
rabbitmq-pw: "rabbit-pw"
rabbitmq-erlang-cookie: "rabbit-erlang"
mon-auth:
grafana-cloud-user: "user"
grafana-cloud-password: "password"