https://pulumi.com logo
Title
r

ripe-russia-4239

11/10/2022, 9:28 PM
Hi, reposting from #dotnet… When writing tests against a Pulumi stack that calls a Get or List Function, what are the names of the Output(s) I need to populate in order for an
Apply()
on the result to return a stubbed value? How do I go about finding this out, even? E.g. given a call in my stack like this, what do I need to stub out in my tests to make it work?
Output<string> connectionString = ListNamespaceKeys.Invoke(new ListNamespaceKeysInvokeArgs
{
    AuthorizationRuleName = authorisationRule.Name,
    NamespaceName = _eventHubNamespace.Name,
    ResourceGroupName = ResourceGroupName
}, _invokeOptions).Apply(o => Output.CreateSecret(o.PrimaryConnectionString));
I finally found the answer to this question in this GitHub Issue comment. I'd love to see a better API developed for this, and with more examples provided.