Make UrlResolver resolve the proper command line used instead of "console" #851
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I've had ambiguous audits in the past where we couldn't determinate from which of our scheduled command these modifications were coming from because everything is "console", so the debugging experience were not ideal.
To improve the situation I implemented a custom way to retrieve the proper command line used while generating the audit, this works great for us.
So I decided to contribute it.
Note: Since the url metadata is now non deterministic in tests because of various possible ways to run the tests (arguments, options, paths, etc.), I've decided to expose the command line resolving logic to make use of it in tests that are not meant to test this feature specifically.
And then introduce a test that is meant to run with a specific command line and thus expect a deterministic output. This one is actually testing the logic.