there is some lib/docs about how to reify
/ mock
aws clients?
hey, sorry, I missed this announcement but I'll let dave know 🙂
Do you mean in aws-api?
Assuming you do, there is no specific support for doing that, so no docs. What are you trying to do?
@kenny check https://github.com/cognitect-labs/aws-api/blob/0072c61aa8a620b2589dcb7421080ad3e13306ff/examples/assume_role_example.clj
@lvh calling it an announcement is a bit aggrandizing 🙂 I was just letting you and Kenny know because you've expressed interest. We're not ready to absorb a ton of feedback yet, but once we are we'll make an actual announcement.
yeah, sorry, I meant notification, either way, much appreciated!~
^^ @souenzzo
I started with (aws/invoke (reify .... {:successId 42}) {:op :DoThing}) ;;=> {:successId 42}
and I see that it's possible to mock out everything but i ran out of time
I will try again this night. tnks 🙂
I still don't understand what you're trying to do. Why not just use a client as/is? Is this for testing?
Yep, for "offline" testing
Why not just use with-redefs
?
I'm assuming that you're reifying ClientSPI
, but that's internal and subject to (read: likely to) change. Until there's a documented seam for what you're doing you'll be safer with with-redefs
(unless you're tests are concerned w/ thread safety, in which case 🤷 ).