Add another inline_resources macro test

This commit is contained in:
bom 2023-11-10 13:26:16 +01:00
parent d7ed1e00bd
commit 1227a8a76f
5 changed files with 17 additions and 2 deletions

View file

@ -3,5 +3,11 @@
[clojure.test :refer [deftest is are testing run-tests]] [clojure.test :refer [deftest is are testing run-tests]]
[dda.c4k-common.macros :refer [inline-resources]])) [dda.c4k-common.macros :refer [inline-resources]]))
(deftest should-count-inline-resources
(is (= 3 (count (inline-resources "ingress")))))
(deftest should-inline-resources (deftest should-inline-resources
(is (= 3 (count (inline-resources "ingress"))))) (let [resource-path (fn [name] (str "dda/c4k_common/inline_resources_test/" name))]
(is (= "1" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_1.yaml"))))
(is (= "2" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_2.yaml"))))
(is (= "3" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_3.yaml"))))))

View file

@ -3,5 +3,11 @@
[cljs.test :refer-macros [deftest is]] [cljs.test :refer-macros [deftest is]]
[dda.c4k-common.macros :refer-macros [inline-resources]])) [dda.c4k-common.macros :refer-macros [inline-resources]]))
(deftest should-inline-resources (deftest should-count-inline-resources
(is (= 3 (count (inline-resources "ingress"))))) (is (= 3 (count (inline-resources "ingress")))))
(deftest should-inline-resources
(let [resource-path (fn [name] (str "dda/c4k_common/inline_resources_test/" name))]
(is (= "1" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_1.yaml"))))
(is (= "2" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_2.yaml"))))
(is (= "3" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_3.yaml"))))))