Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate a hash of parameters for the file name #884

Closed
aaronpowell opened this issue May 17, 2023 · 1 comment
Closed

Generate a hash of parameters for the file name #884

aaronpowell opened this issue May 17, 2023 · 1 comment
Labels
Milestone

Comments

@aaronpowell
Copy link
Contributor

aaronpowell commented May 17, 2023

https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#hashing-parameters

Recently when using Verify for a set of data-driven tests I hit a problem when providing the UseParameters with the parameters of the test would cause the file name and path to be excessively long and cause problems on Windows.

Describe the solution

To work around this, I created a method that will take the parameters and generate a hash from them instead, since that will reduce the length of the file name, but also create something that is going to be consistent across test runs.

Additional context

The extension can be found here: https://github.com/Azure/data-api-builder/pull/1402/files#diff-0e9ff620b043280230cfc29acae2321e450546a8b2c86b3e8e3fa289a9b36a0f

@SimonCropp
Copy link
Member

@aaronpowell i went with a slightly different approach https://github.com/VerifyTests/Verify/blob/main/docs/parameterised.md#hashing-parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants