-
Notifications
You must be signed in to change notification settings - Fork 848
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
Add support for making recordings external to the repository #19322
Conversation
Looks like windows tests are failing due to some path handling differences with the OS. Investigating... |
@jhendrixMSFT @richardpark-msft do you anticipate a future requirement to define configs for recording assets in directories below the service directory (e.g. deeper than |
In |
It's a weird scenario I'm thinking of where you would have tests in a sub-directory, and an asset configuration for those test recordings in the sub-directory, but you invoke the tests from a parent directory (either with |
We definitely need |
862d8b7
to
8f484c8
Compare
Alright, the latest update is much more flexible with the working directory of go test and the asset config path relative to the recording directory (anywhere at or above), as well as fixing some windows file and root detection issues. It does require that tests be run from within a git repository, i.e. this won't work if you have downloaded the repo code without |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thank you so much @benbp
/azp run go - internal - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
a36b85e
to
822befe
Compare
78fec7f
to
058d6d1
Compare
058d6d1
to
0e588a4
Compare
Fixes Azure/azure-sdk-tools#4257
This adds support to the recording package to work with test proxy asset sync, which will allow the test recordings to be moved out of the go repository into https://github.com/Azure/azure-sdk-assets.
The primary behavior change is: if an
assets.json
file is found in the current test service directory or any parent, the recording framework will request external assets via the test proxy during test setup. If there is noassets.json
, then pre-existing recordings will be used instead. This change should support running tests viarun_tests.ps1
or invokinggo test
directly.I also added some minor improvements to the testing scripts.