yogthos / migratus

MIGRATE ALL THE THINGS!
642 stars 93 forks source link

Migrated db-spec to next.jdbc compatible #213

Closed ieugen closed 2 years ago

ieugen commented 2 years ago
ieugen commented 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}")))))
yogthos commented 2 years ago

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.

ieugen commented 2 years ago

Using path instead of java.home. I think it's ready to merge.

ieugen commented 2 years ago

Included in #214