Fork me on GitHub

Is there a way to set config variables when running koacha? For example our application runs with a mount/start state :config variable that sets up some variables for the application to use. Since tests don't mount/start I am trying to send in to koacha ( before it runs ) some config variables or even try to set that mount state config variable like this:


(ns setup-test
  (:require [mount.core :as mount]))

(def test-config
  {:conn               :mem-conn
   :certificate-secret "cert-secret"
   :secret             "secret"
   :encrypt-secret     "encrypt-secret"})

(defn test-setup [_]
    {#'dataico.server-components.config/config (fn [_] test-config)}))

(clojure.test/use-fixtures :once test-setup)


but this is pretty stupid because though it works .. it is a "test" file .. and since we running randomized tests it might run who knows when


so is there a way to run this file first thing before any tests or is there another way to set that config mount state ? up front ?


I think hooks are what you are looking for


There's a brief description of the available hooks in the plugin writing docs


your right @plexus... that is what i am looking for. thanks for letting me know 🙂