azure-sdk-for-net
azure-sdk-for-net copied to clipboard
Integrate Asset-Sync Features
@JoshLove-msft for FYI, feedback, and 🗡️ callouts. 🗡️
I have no doubt that the efficiency of doing path traversal for every test is pretty garbo, but I'm not even certain these are the correct places to inject what I have. Let me know what you think.
Summary of how the assets.json works (and kinda sorta the changes to the framework):
assets.jsonsit in the language repo. These point at external recordings.- When a recording or playback is started, if the additional key of
x-recording-assets-fileis provided, the test-proxy itself will shell out togitand perform the restore operations as necessary. The locally cloned files will be present at<repo-root>/.assets/<10 character key>/- Before you ask, we shell out so we can get your logged in creds if you have them. Gotta set a
GIT_TOKENenv variable otherwise.
- Before you ask, we shell out so we can get your logged in creds if you have them. Gotta set a
- After the restore operation completes, the root of that restored directory is used as "repo root" and the relative path to the test file provided from
x-recording-fileshould combine/align perfectly. - If one does not provide the additional assets json, we just try to find the targeted file from the current context directory that the server is set to.
Extensive documentation for this entire process (including what a "push" looks like) is coming, but I am prioritizing integration and catching gotchas before people hit em in MQ.
I should probably go after storage as another stress test right? I'll get on that.
API change check
API changes are not detected in this pull request.
FYI @kinelski