Skip to content

Commit c45589e

Browse files
authored
[Asset sync] Update documentation (Azure#28041)
1 parent 25b7dfd commit c45589e

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

doc/dev/recording_migration_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Invoke-WebRequest -OutFile "generate-assets-json.ps1" https://raw.githubusercont
6060
- [PowerShell Core][powershell] >= 7.0 is installed.
6161
- [Docker][docker] or [Podman][podman] is installed.
6262
- Global [git config settings][git_setup] are configured for `user.name` and `user.email`.
63-
- These settings can be overridden with environment variables `GIT_COMMIT_EMAIL` and `GIT_COMMIT_OWNER`, respectively.
63+
- These settings can be overridden with environment variables `GIT_COMMIT_OWNER` and `GIT_COMMIT_EMAIL`, respectively.
6464
- The environment variable `GIT_TOKEN` is set to a valid [personal access token][git_token] for your user.
6565
- This token is necessary for authenticating git requests made in a Docker/Podman container.
6666
- Membership in the `azure-sdk-write` GitHub group.

doc/dev/test_proxy_migration_guide.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Please refer to the [troubleshooting guide][troubleshooting] if you have any iss
2020
- [Fetch environment variables](#fetch-environment-variables)
2121
- [Record test variables](#record-test-variables)
2222
- [Migrate management-plane tests](#migrate-management-plane-tests)
23+
- [Next steps](#next-steps)
2324
- [Advanced details](#advanced-details)
2425
- [What does the test proxy do?](#what-does-the-test-proxy-do)
2526
- [How does the test proxy know when and what to record or play back?](#how-does-the-test-proxy-know-when-and-what-to-record-or-play-back)
@@ -348,6 +349,13 @@ instead of AzureRecordedTestCase.
348349
The rest of the information in this guide applies to management-plane packages as well, except for possible specifics
349350
regarding test resource deployment.
350351

352+
## Next steps
353+
354+
Once your tests have been migrated to the test proxy, they can also have their recordings moved out of the
355+
`azure-sdk-for-python` repo. Refer to the [recording migration guide][recording_migration] for more details.
356+
357+
After recordings are moved, you can refer to the instructions in [`tests.md`][tests_md] to manage them.
358+
351359
## Advanced details
352360

353361
### What does the test proxy do?
@@ -507,6 +515,7 @@ client to the test.
507515
[pytest_setup]: https://docs.pytest.org/xunit_setup.html
508516
[pytest_using_fixtures]: https://docs.pytest.org/latest/how-to/fixtures.html#how-to-fixtures
509517

518+
[recording_migration]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/recording_migration_guide.md
510519
[rg_preparer]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/resource_testcase.py
511520

512521
[sanitizers]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md#session-and-test-level-transforms-sanitiziers-and-matchers
@@ -515,6 +524,7 @@ client to the test.
515524

516525
[tables_preparers]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/tables/azure-data-tables/tests/preparers.py
517526
[test_resources]: https://github.com/Azure/azure-sdk-for-python/tree/main/eng/common/TestResources#readme
527+
[tests_md]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#run-tests-with-out-of-repo-recordings
518528
[troubleshooting]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_troubleshooting.md
519529

520530
[variables_api]: https://github.com/Azure/azure-sdk-tools/tree/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy#storing-variables

doc/dev/tests.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,17 @@ to the process of updating recordings.
378378

379379
#### Update test recordings
380380

381+
##### Environment prerequisites
382+
383+
- The targeted library is already migrated to use the test proxy.
384+
- Git version > 2.25.0 is to on the machine and in the path. Git is used by the script and test proxy.
385+
- [Docker][docker_install] or [Podman][podman] is installed.
386+
- Global [git config settings][git_setup] are configured for `user.name` and `user.email`.
387+
- These settings are also set with environment variables `GIT_COMMIT_OWNER` and `GIT_COMMIT_EMAIL`, respectively (in your environment or your local `.env` file).
388+
- The environment variable `GIT_TOKEN` is set to a valid [personal access token][git_token] for your user (in your environment or your local `.env` file).
389+
- This token is necessary for authenticating git requests made in a Docker/Podman container.
390+
- Membership in the `azure-sdk-write` GitHub group.
391+
381392
Test recordings will be updated if tests are run while `AZURE_TEST_RUN_LIVE` is set to "true" and
382393
`AZURE_SKIP_LIVE_RECORDING` is unset or "false". Since the recordings themselves are no longer in the
383394
`azure-sdk-for-python` repo, though, these updates will be reflected in a git-excluded `.assets` folder at the root of
@@ -709,6 +720,8 @@ Tests that use the Shared Access Signature (SAS) to authenticate a client should
709720

710721
[generate_sas]: https://github.com/Azure/azure-sdk-for-python/blob/bf4749babb363e2dc972775f4408036e31f361b4/tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py#L196
711722
[generate_sas_example]: https://github.com/Azure/azure-sdk-for-python/blob/3e3fbe818eb3c80ffdf6f9f1a86affd7e879b6ce/sdk/tables/azure-data-tables/tests/test_table_entity.py#L1691
723+
[git_setup]: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
724+
[git_token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
712725

713726
[kv_test_resources]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/test-resources.json
714727
[kv_test_resources_outputs]: https://github.com/Azure/azure-sdk-for-python/blob/fbdb860630bcc13c1e355828231161849a9bd5a4/sdk/keyvault/test-resources.json#L255

0 commit comments

Comments
 (0)