Skip to content

Commit 20a21f4

Browse files
authored
Fix broken links (#42566)
1 parent 0a16d3b commit 20a21f4

File tree

11 files changed

+13
-29
lines changed

11 files changed

+13
-29
lines changed

doc/dev/mgmt/generating-integration-test.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ You can rearrange sequence or disable particular tests.
9696
## Running Test
9797

9898
To run tests, refer to the documentation at
99-
[/doc/dev/mgmt/tests.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/tests.md). Most test
100-
suites in the Azure SDK have been migrated to use the Azure SDK test proxy, but some libraries that have inactive tests
101-
may still be using an older, deprecated system. The
102-
[test proxy migration guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md)
103-
describes the differences between the systems and their requirements.
99+
[/doc/dev/mgmt/tests.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/tests.md).
104100

105101
## Fixing Test
106102

doc/dev/mgmt/multiapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ o
112112

113113
If this is the same API version, since they will be packed together that's ok (for instance [compute](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2019-03-01/compute.json) and [runcommands](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2019-03-01/runCommands.json) shares `VirtualMachines_` but exists always in the same API version)
114114

115-
If this is not the same API version, then we need to bend the rules a little: we need to understand the intent, and decide which API version we use as folder to ship both (example: [ACR 2019-05-01](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2019-05-01/containerregistry.json) and [registry build 2019-06-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview) are shipped as [2019-06-01-preview](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview) because they share `BuildRegistry_` operation group).
115+
If this is not the same API version, then we need to bend the rules a little: we need to understand the intent, and decide which API version we use as folder to ship both (example: [ACR 2019-05-01](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2019-05-01/containerregistry.json) and [registry build 2019-06-01-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview) were shipped as [2019-06-01-preview](https://github.com/Azure/azure-sdk-for-python/tree/24e4a701802b82832d97f125c6c96567c8e4448e/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview) because they share `BuildRegistry_` operation group).
116116

117117
## Possible improvements
118118

doc/dev/mgmt/tests.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ This simple test creates a resource group and checks that its name is assigned c
190190

191191
Notes:
192192
1. This test inherits all necessary behavior for HTTP recording and playback described previously in this document from its `AzureMgmtRecordedTestCase` superclass. You don't need to do anything special to implement it.
193-
2. The `get_resource_name()` helper method of `AzureMgmtRecordedTestCase` creates a pseudorandom name based on the parameter and the names of the test file and method. This ensures that the name generated is the same for each run of the same test, ensuring reproducability and preventing name collisions if the tests are run live and the same parameter is used from several different tests.
193+
2. The `get_resource_name()` helper method of `AzureMgmtRecordedTestCase` creates a pseudorandom name based on the parameter and the names of the test file and method. This ensures that the name generated is the same for each run of the same test, ensuring reproducibility and preventing name collisions if the tests are run live and the same parameter is used from several different tests.
194194
3. The `create_mgmt_client()` helper method of `AzureMgmtRecordedTestCase` creates a client object using the credentials from `mgmt_settings_fake.py` or `mgmt_settings_real.py` as appropriate, with some checks to make sure it's created successfully and cause the unit test to fail if not. You should use it for any clients you create.
195195
4. While the test cleans up the resource group it creates, you will need to manually delete any resources you've created independent of the test framework. But if you need something like a resource group as a prerequisite for what you're actually trying to test, you should use a "preparer" as demonstrated in the following two examples. Preparers will create and clean up helper resources for you.
196196

@@ -211,7 +211,7 @@ class TestMgmtSearch(AzureMgmtRecordedTestCase):
211211
@ResourceGroupPreparer()
212212
@recorded_by_proxy
213213
def test_search_services(self, resource_group, location):
214-
account_name = self.get_resource_name(''ptvstestsearch')
214+
account_name = self.get_resource_name('search')
215215

216216
service = self.client.services.begin_create_or_update(
217217
resource_group.name,
@@ -327,7 +327,7 @@ class TestMgmtSearch(AzureMgmtRecordedTestCase):
327327
@ResourceGroupPreparer(client_kwargs={'base_url':_CUSTOM_ENDPOINT})
328328
@recorded_by_proxy
329329
def test_search_services(self, resource_group, location):
330-
account_name = self.get_resource_name(''ptvstestsearch')
330+
account_name = self.get_resource_name('search')
331331

332332
service = self.client.services.begin_create_or_update(
333333
resource_group.name,
@@ -357,5 +357,5 @@ class TestMgmtSearch(AzureMgmtRecordedTestCase):
357357
[dev_setup]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/dev_setup.md
358358
[devtools_testutils]: https://github.com/Azure/azure-sdk-for-python/tree/main/tools/azure-sdk-tools/devtools_testutils
359359
[mgmt_settings_fake]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py
360-
[testproxy]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
360+
[testproxy]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#write-or-run-tests
361361
[pytest]: https://docs.pytest.org/en/latest/

scripts/quickstart_tooling_dpg/template_tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from devtools_testutils import test_proxy, add_general_string_sanitizer
1111

12-
# For more info about add_sanitizers, please refer to https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md#register-sanitizers
12+
# For more info about add_sanitizers, please refer to https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#sanitize-secrets
1313
@pytest.fixture(scope="session", autouse=True)
1414
def add_sanitizers(test_proxy):
1515
subscription_id = os.environ.get("{{ test_prefix | upper }}_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")

sdk/batch/azure-batch/tests/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def recorded_by_proxy_async(test_func):
2929
"""Decorator that redirects network requests to target the azure-sdk-tools test proxy. Use with recorded tests.
3030
3131
For more details and usage examples, refer to
32-
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
32+
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#write-or-run-tests
3333
"""
3434

3535
async def record_wrap(*args, **kwargs):

sdk/webpubsub/azure-messaging-webpubsubservice/tests/STATE_OF_TESTS.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

tools/azure-sdk-tools/devtools_testutils/aio/proxy_testcase_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def recorded_by_proxy_async(test_func):
2323
"""Decorator that redirects network requests to target the azure-sdk-tools test proxy. Use with recorded tests.
2424
2525
For more details and usage examples, refer to
26-
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
26+
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#write-or-run-tests
2727
"""
2828

2929
async def record_wrap(*args, **kwargs):

tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class AzureRecordedTestCase(object):
3636
"""Test class for use by data-plane tests that use the azure-sdk-tools test proxy.
3737
3838
For more details and usage examples, refer to
39-
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
39+
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#write-or-run-tests
4040
"""
4141

4242
@property

tools/azure-sdk-tools/devtools_testutils/mgmt_recorded_testcase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AzureMgmtRecordedTestCase(AzureRecordedTestCase):
1010
"""Test class for use by management-plane tests that use the azure-sdk-tools test proxy.
1111
1212
For more details and usage examples, refer to
13-
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md
13+
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#write-or-run-tests
1414
"""
1515

1616
def create_mgmt_client(self, client_class, **kwargs):

tools/azure-sdk-tools/devtools_testutils/proxy_fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async def recorded_test(test_proxy: None, request: "FixtureRequest") -> "Dict[st
141141
"""Fixture that redirects network requests to target the azure-sdk-tools test proxy.
142142
143143
Use with recorded tests. For more details and usage examples, refer to
144-
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md.
144+
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#write-or-run-tests.
145145
146146
:param test_proxy: The fixture responsible for starting up the test proxy server.
147147
:type test_proxy: None

0 commit comments

Comments
 (0)