https://pulumi.com logo
#golang
Title
q

quiet-addition-42622

11/16/2021, 2:18 AM
Hello, does anyone have experience with table driven tests and pulumi? I’m having issues testing functions using the
pulumi.RequireSecret()
and
pulumi.Unsecret()
functions. The tests pass, but fail with the data race flag set because of
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).fulfillValue()|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).fulfillValue()>
assigning values to the
*pulumi.OutputState
, even though each sub test has its own context and values. Here is the code I’m trying to test and the associated unit tests for it.
m

microscopic-florist-22719

11/16/2021, 5:08 PM
Hm. At a glance, this looks like it may be a limitation of our Go SDK, but I’m not entirely certain.
q

quiet-addition-42622

11/16/2021, 5:51 PM
thanks for taking a look! do you have any suggestions for how to move forward?
m

microscopic-florist-22719

11/16/2021, 6:11 PM
Nothing I feel great about, unfortunately--I think the best thing to do here is to file an issue in https://github.com/pulumi/pulumi with the symptoms you’ve described. And thank you for linking the code--that’s very very helpful
q

quiet-addition-42622

11/16/2021, 6:20 PM
okay I’ll do that 🙂 thanks
3 Views