https://pulumi.com logo
#general
Title
# general
w

worried-engineer-33884

06/27/2019, 7:20 PM
if i am instantiating a second aws provider, e.g.:
Copy code
const otherProvider = new aws.Provider("otherProvider")
do i have to do anything special to run mocha unit tests on things that use that provider?
I am getting:
Copy code
(node:14086) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'invoke' of undefined
    at /Users/dustinfarris/Work/DLP/pulumi-ucboitlake/node_modules/@pulumi/pulumi/runtime/invoke.js:63:114
cc @gentle-diamond-70147
g

gentle-diamond-70147

06/27/2019, 7:34 PM
Looks like https://github.com/pulumi/pulumi/issues/2838. Are you using a "data source" function?
Your tests still execute successfully, yes?
w

worried-engineer-33884

06/27/2019, 7:36 PM
the test executes, not sure how successful yet, i just had a simple 1+1 assertion
yes using a data source function
aws.secretsmanager.getSecretVersion
so looks like this is not related to the fact that i am using a custom instance of aws.Provider
g

gentle-diamond-70147

06/27/2019, 7:42 PM
Yea, think it's unrelated to that.
w

worried-engineer-33884

06/27/2019, 7:42 PM
what are you doing in your own project? stubbing out the data source function with something like sinon?
g

gentle-diamond-70147

06/27/2019, 7:44 PM
Ignoring the warning. 😬
w

worried-engineer-33884

06/27/2019, 7:45 PM
haha ok 👍