Closed ieugen closed 2 years ago
btw, 1 test fails if you don't have JAVA_HOME set . This is not ok IMO.
(deftest test-properties
(is (nil? (props/load-properties {})))
(is (number? (get (props/load-properties {:properties {}}) "${migratus.timestamp}")))
(let [props (props/load-properties
{:properties
{:env ["java.home"]
:map {:foo "bar"
:baz {:bar "foo"}}}})]
;; This one fails
(is (seq (get props "${java.home}")))
(is (= "bar" (get props "${foo}")))
(is (= "foo" (get props "${baz.bar}")))))
Yeah, I think using some other variable like home
or classpath
instead would be fine. I don't think anything in migratus relies on java.home
being present.
Using path instead of java.home. I think it's ready to merge.
Included in #214