Repair and test monitoring auth spec
This commit is contained in:
parent
acb2a2155e
commit
c7560de0db
3 changed files with 10 additions and 2 deletions
|
@ -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?
|
||||
|
|
|
@ -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")))))
|
7
src/test/resources/keycloak-test/invalid-auth.yaml
Normal file
7
src/test/resources/keycloak-test/invalid-auth.yaml
Normal 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"
|
Loading…
Reference in a new issue