Pester testing uniqueString #13940
-
We are running pester tests on our deployments. We also use uniqueString to generate unique names for various resources. We have been looking into the bicep repo in order to figure out, how the uniqueString function generates the unique string, so we can do the same calculation in our pester test. Unfortunately, we have not had success finding the function in the main branch. It would be great, if we could be pointed in the right direction in the repo. If anyone already build something that can generate a matching uniqueString, that would also be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use the interoperability between Powershell and C# to implement the solution from the top answer here https://stackoverflow.com/questions/43295720/azure-arm-uniquestring-function-mimic The provided |
Beta Was this translation helpful? Give feedback.
You can use the interoperability between Powershell and C# to implement the solution from the top answer here
https://stackoverflow.com/questions/43295720/azure-arm-uniquestring-function-mimic
The provided
UniqueString
by the user does indeed generate similar string to what is seen in the ARM service.