microscopic-dress-1605
03/24/2021, 5:22 PMaws-resource
for creating AWS resources. The package aws-resource
is used inside a Pulumi stack.
When I execute the unit tests of the Pulumi stack, it complains with ‘_Error: Program run without the Pulumi engine available; re-run using the pulumi
CLI_’. Although the unit tests of the stack contain the mocking code for Pulumi resources.
pulumi.runtime.setMocks({
newResource: function(...) { ... }
});
I guess the pulumi API calls inside the Nodejs package aws-resource
don’t get mocked.
What should I do to also have the resources created by the package aws-resource
mocked?PULUMI_TEST_MODE=true
.little-cartoon-10569
03/24/2021, 7:41 PMpulumi.runtime.runInPulumiStack()
.runInPulumiStack
in a test was to test registerStackTransformation
.microscopic-dress-1605
03/24/2021, 9:02 PMpulumi.runtime.runInPulumiStack()
I’ll take a look at that.ComponentResources
does. I also wasn’t aware of that one 🙄 😄little-cartoon-10569
03/24/2021, 9:15 PMmicroscopic-dress-1605
03/24/2021, 9:22 PM--max-old-space-size