Skip to content

Commit 0ac0577

Browse files
committed
move tools/azure-sdk-tools under eng/tools
1 parent 862448b commit 0ac0577

File tree

633 files changed

+634
-635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

633 files changed

+634
-635
lines changed

.github/workflows/azure-sdk-tools.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches: [ main ]
77
paths:
8-
- "tools/azure-sdk-tools/**"
8+
- "eng/tools/azure-sdk-tools/**"
99

1010
jobs:
1111
build-and-test:
@@ -20,12 +20,12 @@ jobs:
2020

2121
- name: Install azure-sdk-tools
2222
run: |
23-
python -m pip install -e tools/azure-sdk-tools[build,ghtools,conda]
23+
python -m pip install -e eng/tools/azure-sdk-tools[build,ghtools,conda]
2424
python -m pip freeze
2525
shell: bash
2626

2727
- name: Run tests
2828
run: |
2929
pytest ./tests
3030
shell: bash
31-
working-directory: tools/azure-sdk-tools
31+
working-directory: eng/tools/azure-sdk-tools

doc/dev/code_snippets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ If you have a file in `samples\text_example_async.py` with a snippet named `asyn
4343
## Run python_snippet_updater tool
4444

4545
```powershell
46-
python <azure-sdk-for-python>/tools/azure-sdk-tools/ci_tools/snippet_update/python_snippet_updater.py <path_to_the_service>
46+
python <azure-sdk-for-python>/eng/tools/azure-sdk-tools/ci_tools/snippet_update/python_snippet_updater.py <path_to_the_service>
4747
```
4848

4949
The script scans the snippets in samples folder and populates snippet references in README with the snippet definitions from samples folder.

doc/dev/conda-builds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Follow the instructions [here](https://docs.conda.io/projects/conda-build/en/lat
2222

2323
```bash
2424
# cd <repo root>
25-
pip install "tools/azure-sdk-tools[build,conda]"
25+
pip install "eng/tools/azure-sdk-tools[build,conda]"
2626
```
2727

2828
### Get the configuration blob

doc/dev/credscan_process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ strings in that file will still trigger warnings if present in another unsuppres
7373
[ci_scan_output]: https://dev.azure.com/azure-sdk/public/_build/results?buildId=1426258&view=logs&jobId=b70e5e73-bbb6-5567-0939-8415943fadb9&j=bc67675d-56bf-581f-e0a2-208848ba68ca&t=7eee3a58-6120-518b-7fcb-7e943712aa81
7474
[credscan_doc]: https://aka.ms/credscan
7575
[devops_doc]: https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/413/Credential-Scan-Step-in-Pipeline
76-
[fake_credentials]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/fake_credentials.py
76+
[fake_credentials]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/fake_credentials.py
7777
[suppression_file]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/CredScanSuppression.json

doc/dev/mgmt/mgmt_release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ IMPORTANT NOTE: All the commands in this page assumes you have loaded the [dev_s
2121
## Manual generation
2222

2323
If the automation is not doing its job to create an auto PR, Python has a SwaggerToSdk CLI that can be used to generate a specific Readme. You need
24-
a virtual environment loaded with at least `tools/azure-sdk-tools` installed.
24+
a virtual environment loaded with at least `eng/tools/azure-sdk-tools` installed.
2525

2626
```shell
2727
# Using default configuration (this can be a Github raw link)

doc/dev/mgmt/tests.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ credentials = ClientSecretCredential(
8181
tenant = os.environ['AZURE_TENANT_ID']
8282
)
8383
```
84-
Or you can use `DefaultAzureCredential`, which we prefer.
84+
Or you can use `DefaultAzureCredential`, which we prefer.
8585
You can test with this code:
8686
```python
8787
import os
@@ -92,7 +92,7 @@ credentials = DefaultAzureCredential()
9292

9393
## Providing credentials to the tests
9494

95-
When you run tests in playback mode, they use a fake credentials file, located at [`tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py`][mgmt_settings_fake], to simulate authenticating with Azure. In most scenarios you will not have to adjust this file, you will have to make edits to this file if your service uses values that are not already included in the `mgmt_settings_fake.py` file.
95+
When you run tests in playback mode, they use a fake credentials file, located at [`eng/tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py`][mgmt_settings_fake], to simulate authenticating with Azure. In most scenarios you will not have to adjust this file, you will have to make edits to this file if your service uses values that are not already included in the `mgmt_settings_fake.py` file.
9696

9797
In live mode, you need to use real credentials like those you obtained in the previous section. To enable the tests to use them, make a copy of the `mgmt_settings_fake.py` file in the same location, and rename it `mgmt_settings_real.py`.
9898
Then make the following changes:
@@ -123,7 +123,7 @@ These two methods are used by the authentication methods within `AzureTestCase`
123123

124124
To configure the tests to run in live mode, you have two options:
125125
* Set the environment variable `AZURE_TEST_RUN_LIVE` to "true" or "yes".
126-
* Create the `tools/azure-sdk-tools/devtools_testutils/testsettings_local.cfg` file and copy and paste the following line:
126+
* Create the `eng/tools/azure-sdk-tools/devtools_testutils/testsettings_local.cfg` file and copy and paste the following line:
127127
```
128128
live-mode: true
129129
```
@@ -134,7 +134,7 @@ Now you can run tests using the same method described in [Running the tests](#ru
134134
## Running tests in playback mode
135135
Now that the tests have been run against live resources and generated the HTTP recordings, you can run your tests in playback mode. There are two options for changing from live mode to playback mode:
136136
* Set the environment variable `AZURE_TEST_RUN_LIVE` to "false" or "no".
137-
* Change the `tools/azure-sdk-tools/devtools_testutils/testsettings_local.cfg` file to:
137+
* Change the `eng/tools/azure-sdk-tools/devtools_testutils/testsettings_local.cfg` file to:
138138
```
139139
live-mode: false
140140
```
@@ -158,7 +158,7 @@ For more information about legacy tests, see [Legacy tests](https://github.com/A
158158
159159
Management plane SDKs are those that are formatted `azure-mgmt-xxxx`, otherwise the SDK is data plane. Management plane SDKs work against the [Azure Resource Manager APIs][arm_apis], while the data plane SDKs will work against service APIs. This section will demonstrate writing tests using `devtools_testutils` with a few increasingly sophisticated examples to show how to use some of the features of the underlying test frameworks.
160160
161-
### Tips:
161+
### Tips:
162162
After the migration of the test proxy, `conftests.py` needs to be configured under the tests folder.<br/>
163163
* For a sample about `conftest.py`, see [conftest.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/advisor/azure-mgmt-advisor/tests/conftest.py). <br/>
164164
* For more information about test proxy, see [TestProxy][testproxy].
@@ -174,7 +174,7 @@ AZURE_LOCATION = 'eastus'
174174
class TestExampleResourceGroup(AzureMgmtRecordedTestCase):
175175
def setup_method(self, method):
176176
self.client = self.create_mgmt_client(ResourceManagementClient)
177-
177+
178178
@recorded_by_proxy
179179
def test_create_resource_group(self):
180180
test_group_name = self.get_resource_name('testgroup')
@@ -351,11 +351,11 @@ class TestMgmtSearch(AzureMgmtRecordedTestCase):
351351

352352
<!-- LINKS -->
353353
[arm_apis]: https://docs.microsoft.com/rest/api/resources/
354-
[azure_sdk_tools]: https://github.com/Azure/azure-sdk-for-python/tree/main/tools/azure-sdk-tools
354+
[azure_sdk_tools]: https://github.com/Azure/azure-sdk-for-python/tree/main/eng/tools/azure-sdk-tools
355355
[azure_portal]: https://portal.azure.com/
356356
[decorators]: https://www.python.org/dev/peps/pep-0318/
357357
[dev_setup]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/dev_setup.md
358-
[devtools_testutils]: https://github.com/Azure/azure-sdk-for-python/tree/main/tools/azure-sdk-tools/devtools_testutils
359-
[mgmt_settings_fake]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py
358+
[devtools_testutils]: https://github.com/Azure/azure-sdk-for-python/tree/main/eng/tools/azure-sdk-tools/devtools_testutils
359+
[mgmt_settings_fake]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py
360360
[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/

doc/dev/perfstress_tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
# The perfstress framework
2020

2121
The perfstress framework has been added to the `devtools_testutils` package. The code can be found
22-
[here](https://github.com/Azure/azure-sdk-for-python/tree/main/tools/azure-sdk-tools/devtools_testutils/perfstress_tests).
22+
[here](https://github.com/Azure/azure-sdk-for-python/tree/main/eng/tools/azure-sdk-tools/devtools_testutils/perfstress_tests).
2323
The framework provides a baseclass to inherit from when writing tests, as well as some tools and utilities to
2424
facilitate running the tests. To start using the framework, make sure that `azure-sdk-tools` (which contains
2525
`devtools_testutils`) is included in the `dev_requirements.txt` for the SDK:
2626
```
27-
-e ../../../tools/azure-sdk-tools
27+
-e ../../../eng/tools/azure-sdk-tools
2828
```
2929
The perfstress framework offers the following:
3030
- The `perfstress` commandline tool.

doc/dev/test_proxy_troubleshooting.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ client to the test.
105105

106106
Test suites that haven't fully migrated to using a `test-resources.json` file for test resource deployment might use
107107
resource preparers, such as
108-
[ResourceGroupPreparer](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/resource_testcase.py).
108+
[ResourceGroupPreparer](https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/resource_testcase.py).
109109
Resource preparers need a management client to function, so test classes that use them will need to inherit from
110110
[AzureMgmtRecordedTestCase][mgmt_recorded_test_case] instead of AzureRecordedTestCase.
111111

@@ -369,20 +369,20 @@ Alternatively, you can delete the installed tool and re-run your tests to automa
369369

370370
<!-- Links -->
371371

372-
[custom_default_matcher]: https://github.com/Azure/azure-sdk-for-python/blob/497f5f3435162c4f2086d1429fc1bba4f31a4354/tools/azure-sdk-tools/devtools_testutils/sanitizers.py#L85
372+
[custom_default_matcher]: https://github.com/Azure/azure-sdk-for-python/blob/497f5f3435162c4f2086d1429fc1bba4f31a4354/eng/tools/azure-sdk-tools/devtools_testutils/sanitizers.py#L85
373373
[detailed_docs]: https://github.com/Azure/azure-sdk-tools/tree/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md
374-
[env_var_loader]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/envvariable_loader.py
374+
[env_var_loader]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/envvariable_loader.py
375375
[gitattributes]: https://git-scm.com/docs/gitattributes
376-
[mgmt_recorded_test_case]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/mgmt_recorded_testcase.py
376+
[mgmt_recorded_test_case]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/mgmt_recorded_testcase.py
377377
[parametrize]: https://docs.pytest.org/latest/example/parametrize.html
378378
[parametrize_class]: https://github.com/Azure/azure-sdk-for-python/blob/aa607b3b8c3e646928375ebcc6339d68e4e90a49/sdk/keyvault/azure-keyvault-keys/tests/_test_case.py#L61
379379
[parametrize_example]: https://github.com/Azure/azure-sdk-for-python/blob/aa607b3b8c3e646928375ebcc6339d68e4e90a49/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py#L190
380380
[pipelines_ci]: https://github.com/Azure/azure-sdk-for-python/blob/5ba894966ed6b0e1ee8d854871f8c2da36a73d79/sdk/eventgrid/ci.yml#L30
381381
[pipelines_live]: https://github.com/Azure/azure-sdk-for-python/blob/e2b5852deaef04752c1323d2ab0958f83b98858f/sdk/textanalytics/tests.yml#L26-L27
382-
[playback_request_failure]: https://github.com/Azure/azure-sdk-for-python/blob/e23d9a6b1edcc1127ded40b9993029495b4ad08c/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py#L108
383-
[py_sanitizers]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/sanitizers.py
382+
[playback_request_failure]: https://github.com/Azure/azure-sdk-for-python/blob/e23d9a6b1edcc1127ded40b9993029495b4ad08c/eng/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py#L108
383+
[py_sanitizers]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/sanitizers.py
384384
[pytest_collection]: https://docs.pytest.org/latest/goodpractices.html#test-discovery
385385
[pytest_commands]: https://docs.pytest.org/latest/usage.html
386-
[record_request_failure]: https://github.com/Azure/azure-sdk-for-python/blob/e23d9a6b1edcc1127ded40b9993029495b4ad08c/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py#L97
386+
[record_request_failure]: https://github.com/Azure/azure-sdk-for-python/blob/e23d9a6b1edcc1127ded40b9993029495b4ad08c/eng/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py#L97
387387
[test_proxy_sanitizers]: https://github.com/Azure/azure-sdk-tools/blob/57382d5dc00b10a2f9cfd597293eeee0c2dbd8fd/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs#L65
388388
[wrong_exception]: https://github.com/Azure/azure-sdk-tools/issues/2907

doc/dev/tests.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ resources, and sanitizing credentials in recordings.
160160

161161
The `devtools_testutils` package also has other classes and functions to provide test utility, which are documented in
162162
the
163-
[package README](https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/README.md).
163+
[package README](https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/README.md).
164164

165165
## Write or run tests
166166

@@ -578,19 +578,19 @@ For information about more advanced testing scenarios, refer to the [advanced te
578578
[advanced_tests_notes]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests-advanced.md
579579
[azure_cli_service_principal]: https://docs.microsoft.com/cli/azure/ad/sp?view=azure-cli-latest#az-ad-sp-create-for-rbac
580580
[azure_portal]: https://portal.azure.com/
581-
[azure_recorded_test_case]: https://github.com/Azure/azure-sdk-for-python/blob/7e66e3877519a15c1d4304eb69abf0a2281773/tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py#L44
581+
[azure_recorded_test_case]: https://github.com/Azure/azure-sdk-for-python/blob/7e66e3877519a15c1d4304eb69abf0a2281773/eng/tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py#L44
582582
[central_conftest]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/conftest.py
583-
[env_var_docs]: https://github.com/Azure/azure-sdk-for-python/tree/main/tools/azure-sdk-tools/devtools_testutils#use-the-environmentvariableloader
584-
[env_var_loader]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/envvariable_loader.py
585-
[get_credential]: https://github.com/Azure/azure-sdk-for-python/blob/20cf5b0bd9b87f90bd5ad4fd36358d3b257f95c5/tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py#L96
583+
[env_var_docs]: https://github.com/Azure/azure-sdk-for-python/tree/main/eng/tools/azure-sdk-tools/devtools_testutils#use-the-environmentvariableloader
584+
[env_var_loader]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/envvariable_loader.py
585+
[get_credential]: https://github.com/Azure/azure-sdk-for-python/blob/20cf5b0bd9b87f90bd5ad4fd36358d3b257f95c5/eng/tools/azure-sdk-tools/devtools_testutils/azure_recorded_testcase.py#L96
586586
[git_setup]: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
587587
[kv_test_resources]: https://github.com/Azure/azure-sdk-for-python/blob/fbdb860630bcc13c1e355828231161849a9bd5a4/sdk/keyvault/test-resources.json
588588
[kv_test_resources_outputs]: https://github.com/Azure/azure-sdk-for-python/blob/fbdb860630bcc13c1e355828231161849a9bd5a4/sdk/keyvault/test-resources.json#L255
589589
[kv_test_resources_resources]: https://github.com/Azure/azure-sdk-for-python/blob/fbdb860630bcc13c1e355828231161849a9bd5a4/sdk/keyvault/test-resources.json#L116
590590
[manage_recordings]: https://github.com/Azure/azure-sdk-for-python/blob/main/scripts/manage_recordings.py
591591
[packaging]: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/packaging.md
592592
[proxy_general_docs]: https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md
593-
[py_sanitizers]: https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/devtools_testutils/sanitizers.py
593+
[py_sanitizers]: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/devtools_testutils/sanitizers.py
594594
[pytest_invocation]: https://pytest.org/latest/how-to/usage.html
595595
[pytest_logging]: https://docs.pytest.org/en/stable/logging.html
596596
[python-dotenv_readme]: https://github.com/theskumar/python-dotenv

eng/CredScanSuppression.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"sdk/identity/azure-identity/tests/ec-certificate.pem",
4949
"sdk/core/azure-servicemanagement-legacy/tests/legacy_mgmt_settings_fake.py",
5050
"sdk/storage/azure-storage-blob/tests/fake_credentials.py",
51-
"tools/azure-sdk-tools/devtools_testutils/fake_credentials.py",
52-
"tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py"
51+
"eng/tools/azure-sdk-tools/devtools_testutils/fake_credentials.py",
52+
"eng/tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py"
5353
],
5454
"_justification": "File contains private key used by test code."
5555
},

0 commit comments

Comments
 (0)