Compare commits

...

2 commits

Author SHA1 Message Date
d2ca5b5442 Fix tests 2024-08-07 14:57:54 +02:00
2fba9ce1de Remove unnecessary keys 2024-08-07 14:57:47 +02:00
2 changed files with 3 additions and 4 deletions

View file

@ -49,8 +49,7 @@
(defn-spec generate-service cp/map-or-seq? (defn-spec generate-service cp/map-or-seq?
[config config?] [config config?]
(let [{:keys [namespace]} config (let [{:keys [namespace]} config]
{:keys [keycloak-admin-user keycloak-admin-password]} auth]
(-> (->
(yaml/load-as-edn "keycloak/service.yaml") (yaml/load-as-edn "keycloak/service.yaml")
(cm/replace-all-matching "NAMESPACE" namespace)))) (cm/replace-all-matching "NAMESPACE" namespace))))

View file

@ -15,7 +15,7 @@
:data :data
{:keycloak-user "dXNlcg==" {:keycloak-user "dXNlcg=="
:keycloak-password "cGFzc3dvcmQ="}} :keycloak-password "cGFzc3dvcmQ="}}
(cut/generate-secret {:keycloak-admin-user "user" :keycloak-admin-password "password"})))) (cut/generate-secret {:namespace "keycloak" :fqdn "test.de"} {:keycloak-admin-user "user" :keycloak-admin-password "password"}))))
(deftest should-generate-deployment (deftest should-generate-deployment
(is (= {:apiVersion "apps/v1", (is (= {:apiVersion "apps/v1",
@ -75,4 +75,4 @@
:items :items
[{:key "tls.crt", :path "tls.crt"} [{:key "tls.crt", :path "tls.crt"}
{:key "tls.key", :path "tls.key"}]}}]}}}} {:key "tls.key", :path "tls.key"}]}}]}}}}
(cut/generate-deployment {:fqdn "test.de"})))) (cut/generate-deployment {:fqdn "test.de" :namespace "keycloak"}))))