This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-15
Channels
- # announcements (2)
- # babashka (137)
- # beginners (96)
- # calva (3)
- # cider (11)
- # clj-kondo (8)
- # cljs-dev (161)
- # cljsrn (21)
- # clojure (78)
- # clojure-europe (47)
- # clojure-france (1)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-spec (24)
- # clojure-uk (9)
- # clojuredesign-podcast (4)
- # clojurescript (39)
- # conjure (2)
- # core-async (27)
- # cursive (36)
- # datomic (54)
- # emacs (6)
- # figwheel (9)
- # figwheel-main (46)
- # fulcro (25)
- # graalvm (8)
- # helix (30)
- # hoplon (6)
- # hugsql (3)
- # jobs (5)
- # leiningen (7)
- # luminus (12)
- # nrepl (20)
- # off-topic (20)
- # pedestal (16)
- # re-frame (14)
- # reagent (3)
- # reitit (3)
- # remote-jobs (5)
- # rum (25)
- # shadow-cljs (60)
- # spacemacs (10)
- # vim (2)
- # xtdb (36)
Imo faking the request should be considered bad practice. Why do people test whether http library like pedestal works? Shouldn't we test the domain logic instead?
That’s my issue is because of all the chained interceptors (I’m brand new to pedestal and interceptors ), I don’t understand how to get the result of an endpoint without using response-for
Let’s say I wanted to get a swagger.json from
and upload it to S3. Would you be able to do that without using response-for ?
IDK, that’s less of a pedestal concern. While working in the repl during development I don’t use response-for
. I limit the usage to testing. In the repl I work with small fns which handle the core logic of the system
I don’t think end-to-end testing is bad practice but it should not be applied as a hammer either.
I also tend to spin up my service and send requests to it during dev as well. Changes being applied as I build. But I do that when I’m interested in any wiring I’ve done
If an interceptor requires some setup (i.e., data in context) I either fake that or add the interceptors that bring in that data to the interceptor chain that gets executed
(def result-ctx (io.pedestal.interceptor.chain/execute {} [interceptor1 interceptor2 …])
The concept of Chain Provider is at the core of Pedestal http://pedestal.io/reference/chain-providers#chain-providers