arcus-azure / arcus.testing

Reusable testing components used during Arcus testing.
https://testing.arcus-azure.net/
MIT License
5 stars 2 forks source link

`TemporaryEnvironmentVariable`: test fixture for local development as well as managed identity connection #166

Open stijnmoreels opened 1 month ago

stijnmoreels commented 1 month ago

Is your feature request related to a problem? Please describe. I noticed that I had to implement the TemporaryEnvironmentVariable multiple times now for projects that need either managed identity connection or when the test locally starts up the app and sets certain variables.

Describe the solution you'd like A test fixture called TemporaryEnvironmentVariable that temporary sets an environment variable during the lifetime of the fixture. Should be in the Arcus.Testing.Core library.

stijnmoreels commented 1 month ago

Closely related to this is a possible TemporaryMangedIdentityConnection test fixture that would build upon these temporary environment variables to temporary set a service principal managed identity connection to authenticate more easily with any additional Azure resource during the test run.