https://pulumi.com logo
Title
r

ripe-russia-4239

11/03/2022, 11:03 AM
Has anyone successfully written tests for a C# Pulumi project that uses
new Pulumi.Config()
? I'm trying a few approaches, currently injecting the
Pulumi.Config
instance via the Stack's constructor, but I can't work out how to populate the config object in my tests with sample values. The class is sealed and implements no interfaces, so it's not possible to mock it either (as far as I can tell)
I found this GitHub issue and comment, which pointed me toward populating a
PULUMI_CONFIG
environment variable. This has worked quite nicely, but it's hardly intuitive 😆