[TestProxy] Cannot locate recordings when debugging with VSCode
See original GitHub issueWhen I run a test-proxy test via the terminal, it puts the recording in the correct place, regardless of my CWD and seemingly regardless of whether I have TEST_PROXY_FOLDER set. For example, if I run a search test, it correctly places the recording in:
{repoRoot}/sdk/search/azure-search-documents/tests/recordings/
However, because this fails on playback, I need to be able to debug into the process to figure out what is going wrong. However, when I run the test using the pytest testing extension for VSCode, test proxy places the recordings in the wrong location when live and cannot locate them on playback.
To make the debugger see the environment variables, I have to use a .env
file. In it I specify both TEST_PROXY_FOLDER
and AZURE_TEST_RUN_LIVE=true
. While it picks up the “run live” signal, it places the recordings at the repo root, regardless of what I put in TEST_PROXY_FOLDER
(it doesn’t seem to care about it at all).
{repoRoot}/tests/recordings/
However, when I switch AZURE_TEST_RUN_LIVE=false
in the .env
file, it tries to play back but I have no idea where it is looking for the recording but it can’t find it.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Cool, yes it now seems that the recording is placed in the right location and it does find it. While I run into other issues, at least this one can be closed!
@tjprescott Now that #22508 has been merged, let me know if this issue persists. If you’re now able to load the recording files in debug mode, feel free to close this!