keep compatibility
This commit is contained in:
parent
a1a49e10d0
commit
c1f2cefd14
2 changed files with 16 additions and 3 deletions
|
@ -64,9 +64,14 @@
|
|||
|
||||
|
||||
(defn-spec generate-secret map?
|
||||
[config pg-config?
|
||||
auth pg-auth?]
|
||||
(int/generate-secret config auth))
|
||||
([auth pg-auth?]
|
||||
(let [final-config default-config]
|
||||
(int/generate-secret final-config auth)))
|
||||
([config pg-config?
|
||||
auth pg-auth?]
|
||||
(let [final-config (merge default-config
|
||||
config)]
|
||||
(int/generate-secret final-config auth))))
|
||||
|
||||
|
||||
(defn-spec generate-service map?
|
||||
|
|
|
@ -39,6 +39,14 @@
|
|||
:resources {:requests {:storage "10Gi"}}}}
|
||||
(cut/generate-pvc {}))))
|
||||
|
||||
(deftest should-generate-secret
|
||||
(is (= {:apiVersion "v1",
|
||||
:kind "Secret",
|
||||
:metadata {:name "postgres-secret", :namespace "default"},
|
||||
:type "Opaque",
|
||||
:data {:postgres-user "eHgtdXM=", :postgres-password "eHgtcHc="}}
|
||||
(cut/generate-secret {:postgres-db-user "xx-us" :postgres-db-password "xx-pw"}))))
|
||||
|
||||
|
||||
(deftest should-generate
|
||||
(is (= 6
|
||||
|
|
Loading…
Reference in a new issue