This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-06
Channels
- # admin-announcements (1)
- # aws (12)
- # beginners (35)
- # boot (12)
- # cider (32)
- # cljsrn (5)
- # clojars (10)
- # clojure (20)
- # clojure-russia (60)
- # clojurescript (229)
- # community-development (14)
- # cursive (9)
- # data-science (4)
- # datomic (3)
- # funcool (2)
- # hoplon (29)
- # jobs (15)
- # jobs-discuss (53)
- # keechma (2)
- # luminus (8)
- # om (42)
- # onyx (15)
- # parinfer (22)
- # re-frame (12)
- # reagent (162)
- # spacemacs (1)
It seems amazonica is the defacto aws sdk wrapper, but it's a bit complicated internally imho. I cant see a way to efficiently mock it either. As far as I understood the Java SDK doesn't lend itself to testing either. There is https://github.com/bizo/aws-java-sdk-stubs which shows some nice examples how should a mock/stub sdk look like but it's not very complete and it's still just java not clj(s).
I can totally agree with it because recently I had to use the Route53 API and I had to construct some stubs myself by try and capturing the behaviour of the real API
I envision some AWS danielsz/system
components - real and stub ones, maybe a separate credential provider component too - which provide an idiomatic clojure interface
I have a super specialized implementation which only satisfies the needs of a very constrained micro project, but i can probably share that to illustrate what am i talking about
@lmergen @onetom i'm wondering if you've looked at the amazonica implementation? amazonica is largely just automatically generating clojure functions around the java apis. see how set-client: https://github.com/mcohen01/amazonica/blob/master/src/amazonica/core.clj#L911 iterates through client-methods, mechanically transforming them into clojure names, and then interning a fn that looks up and determines the best-method in the api to assign to the interned fn. You could probably implement a workable stub with a small fork of amazonica, to muck with the best-method wiring, perhaps changing it to a multimethod and so then you could extensibly return stubs