Wouldn't unit tests for Pulumi config be the responsibility of Pulumi? You shouldn't need to write unit tests that use Pulumi config.
little-cartoon-10569
05/25/2023, 10:25 PM
If you have code that you want to test as a unit, and that code depends on getting values from Pulumi config, then you can (and absolutely should) make it unit testable by not getting values from Pulumi config in that code.
little-cartoon-10569
05/25/2023, 10:26 PM
The code that gets values from Pulumi config should be your top-level project only. This is not a testable unit, so you won't be writing unit tests for it.
little-cartoon-10569
05/25/2023, 10:26 PM
This code will pass config values into units (resources, functions, etc.). Those resources and functions will not be directly using Pulumi config.
n
narrow-guitar-10891
05/26/2023, 7:24 AM
Yeah. This code can also take values as an arguments. Without depending on Pulumi config. I thought, it would be useful to test cases when I’m using some values from Pulumi Comfig instead of arguments