This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-07
Channels
- # aleph (1)
- # announcements (2)
- # babashka (1)
- # beginners (49)
- # calva (1)
- # cider (5)
- # clj-kondo (14)
- # cljdoc (11)
- # cljsrn (6)
- # clojure (120)
- # clojure-austin (1)
- # clojure-europe (6)
- # clojure-finland (3)
- # clojure-italy (29)
- # clojure-nl (6)
- # clojure-spec (38)
- # clojure-uk (14)
- # clojurescript (65)
- # code-reviews (8)
- # cursive (20)
- # data-science (1)
- # datascript (5)
- # datomic (57)
- # emacs (6)
- # figwheel-main (2)
- # fulcro (32)
- # funcool (1)
- # jackdaw (7)
- # jobs (3)
- # joker (7)
- # kaocha (8)
- # keechma (3)
- # nrepl (7)
- # off-topic (25)
- # quil (3)
- # re-frame (10)
- # reagent (43)
- # remote-jobs (1)
- # ring (1)
- # shadow-cljs (173)
- # sim-testing (1)
- # spacemacs (1)
- # sql (3)
- # tools-deps (34)
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 [_]
(mount/start-with
{#'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 ?
There's a brief description of the available hooks in the plugin writing docs https://cljdoc.org/d/lambdaisland/kaocha/0.0-549/doc/9-extending#extension-types
your right @plexus... that is what i am looking for. thanks for letting me know 🙂