Repair and test monitoring auth spec

This commit is contained in:
erik 2023-01-31 10:25:04 +01:00
parent acb2a2155e
commit c7560de0db
3 changed files with 10 additions and 2 deletions

View file

@ -20,7 +20,7 @@
(def auth? (s/keys :req-un [::kc/keycloak-admin-user ::kc/keycloak-admin-password
::postgres/postgres-db-user ::postgres/postgres-db-password]
:opt-un [::mon/auth]))
:opt-un [::mon/mon-auth]))
(defn-spec k8s-objects cp/map-or-seq?
[config config?

View file

@ -17,4 +17,5 @@
(deftest validate-valid-resources
(is (s/valid? cut/config? (yaml/load-as-edn "keycloak-test/valid-config.yaml")))
(is (s/valid? cut/auth? (yaml/load-as-edn "keycloak-test/valid-auth.yaml")))
(is (not (s/valid? cut/config? (yaml/load-as-edn "keycloak-test/invalid-config.yaml")))))
(is (not (s/valid? cut/config? (yaml/load-as-edn "keycloak-test/invalid-config.yaml"))))
(is (not (s/valid? cut/config? (yaml/load-as-edn "keycloak-test/invalid-auth.yaml")))))

View file

@ -0,0 +1,7 @@
keyclok-admin-user: "testuser"
keycloak-admin-password: "testpassword"
postgres-db-user: "keycloakuser"
postgres-db-password: "testdbpassword"
mon-auth:
grafana-cloud-user: "user"
grafana-cloud-password: "password"