Open DianaIonita opened 6 years ago
@nelsonic Would this be a good enhancement for someone new to this project to add?
PickleRick (@RichardWright), if you're happy to write the tests and feature for this we'd be delighted to receive a pull request! 👍
@nelsonic Looking at aws-sdk-mock code, would a mock xray even belong in this project (i.e new repo aws-xray-mock)? It's seperate package and the architecture doesn't fit it. Have you ever thougth about how to do this?
@RichardWright good question. the use-case described by @DianaIonita above indicates that the mock would be created by aws-sdk-mock
and invocations of AWSXRay would return a mock event/context. We are not using XRay (any more).
But give that others have 👍 this issue, we would be glad to get a PR.
Yes, it could be a separate package/module but it feels more like a method/service of this one. 🤔
@DianaIonita Circling back here..
We used the real xray sdk in conjunction with aws-sdk-mock and it worked. How are you initialising the xray sdk with the aws sdk?
Hi @RichardWright,
Thanks for having a look. I just tried to reproduce this issue again on a fresh repo, but had no luck. I'm not sure what was wrong in the first place, but whatever it was, seems to have fixed itself. If I run into this again, I'll add more details.
Thanks
@DianaIonita 👍
@nelsonic I guess close the issue? Mocking xray probably belongs to a new module I'd say.
I'm adding AWS XRay support in my projects and for that I need to wrap my AWS object like so:
Once I do that, however, I seem to no longer be able to use
aws-sdk-mock
- it's not triggering mocked callbacks when mocking, for instance,AWS.Lambda
. Is there a known workaround or is this something you might add support for in the future?Thanks