Added concat-str-vec with string-vector? pred
This commit is contained in:
parent
d644e81345
commit
c3a14c96d1
3 changed files with 18 additions and 2 deletions
|
@ -58,6 +58,11 @@
|
|||
(into []
|
||||
(apply concat vs)))
|
||||
|
||||
(defn-spec concat-str-vec cp/string-vector?
|
||||
[& vs (s/* seq?)]
|
||||
(into []
|
||||
(apply concat vs)))
|
||||
|
||||
(defn generate-common [my-config my-auth config-defaults k8s-objects]
|
||||
(let [resulting-config (merge config-defaults my-config my-auth)]
|
||||
(cs/join
|
||||
|
|
|
@ -44,3 +44,9 @@
|
|||
(fqdn-string? (first split-string))
|
||||
(port-number? (edn/read-string (second split-string)))))))
|
||||
|
||||
(defn string-vector?
|
||||
[input]
|
||||
(and (vector? input)
|
||||
(every? true?
|
||||
(map #(string? %) input))))
|
||||
|
||||
|
|
|
@ -50,3 +50,8 @@
|
|||
(is (false? (cut/host-and-port-string? "test.de,1234")))
|
||||
(is (false? (cut/host-and-port-string? "test.123:1234")))
|
||||
(is (false? (cut/host-and-port-string? "test.de:abc"))))
|
||||
|
||||
(deftest test-string-vector?
|
||||
(is (true? (cut/string-vector? ["hallo" "welt" "!"])))
|
||||
(is (false? (cut/string-vector? ["hallo" 1 "welt" "!"])))
|
||||
(is (false? (cut/string-vector? "hallo welt!"))))
|
Loading…
Reference in a new issue