This message was deleted.
# general
s
This message was deleted.
e
Oh! Yes this is supported, i'll get that page updated not sure why it's missing dotnet. If your using a stack class you can set an export with an
[Output]
attribute: https://github.com/pulumi/examples/blob/master/aws-cs-s3-folder/WebsiteStack.cs#L37-L40 Or if your using the function based deployment you just return a dictionary of values: https://github.com/pulumi/templates/blob/master/aws-native-csharp/Program.cs
🙏 1
b
Hey @echoing-dinner-19531 Thank you so much for this. I'm also wondering is unit testing for stack outputs supported as well? I followed the unit testing guide for .NET Pulumi here and it works great for stack resources. However if I wanted to also assert that the stack output is correct, would I do that with a particularly resource in the array that the mock function returns? (Nothing looks obvious from class naming to me) Or is there a different method for testing these things?
e
I'll admit I've not got as much experience with our test setups as I should! But I think there should be a Stack resource returned in the resources array, and the stack outputs will be in the
Outputs
property.
b
Hi @echoing-dinner-19531 Apologies to keep "@ing" you. I took a look at the code and it looks like there is support for outputs on the overloads for the `TestAsync` function however if you use the `TestWithServiceProviderAsync` function then it only supports the resource array output and I couldn't find any type that corresponds to
Outputs
in there. Wondering if this is not supported with service providers for a reason? Or if it's just an oversight? Or if there's some other intended way to get the outputs out for testing when you use a service provider?
e
Probably just oversight 😞
Raise an issue we can look at aligning them
b
Thank you! 😄 Will do!
@echoing-dinner-19531 I've raised an issue and an associated PR to hopefully address it. Though I'm not sure if this is a change that requires changelog updates.