You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/dev/tests.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,9 +183,12 @@ Both pure ARM templates (`test-resources.json`) and BICEP files (`test-resources
183
183
184
184
User-based authentication is preferred when using test resources. To enable this:
185
185
- Use the [`-UserAuth` command flag][user_auth_flag] when running the `New-TestResources` script.
186
-
- Set the environment variable `AZURE_TEST_USE_PWSH_AUTH` to "true" to authenticate with Azure PowerShell, or
187
-
`AZURE_TEST_USE_CLI_AUTH` to "true" to authenticate with Azure CLI.
188
-
- Ensure you're logged into the tool you choose -- if
186
+
- Choose a development tool to authenticate with by setting an `AZURE_TEST_USE_*_AUTH` environment variable to "true" (tests will authenticate as the tool's logged-in user). The following tools are supported, listed in the order that authentication will be attempted in if requested:
187
+
1. Azure PowerShell: set `AZURE_TEST_USE_PWSH_AUTH`.
188
+
2. Azure CLI (`az`): set `AZURE_TEST_USE_CLI_AUTH`.
189
+
3. Visual Studio Code: set `AZURE_TEST_USE_VSCODE_AUTH`.
190
+
4. Azure Developer CLI (`azd`): set `AZURE_TEST_USE_AZD_AUTH`.
191
+
- Ensure you're logged into the tool you choose -- if
189
192
you used `New-TestResources.ps1` to deploy resources, you'll already have logged in with Azure PowerShell.
190
193
191
194
If you haven't yet set up a `test-resources` file for test resource deployment and/or want to use test resources of
@@ -216,13 +219,15 @@ environment variables necessary to run live tests for the service. After storing
216
219
-- formatted as `VARIABLE=value` on separate lines -- your credentials and test configuration variables will be set in
217
220
our environment when running tests.
218
221
219
-
If you used the [`-UserAuth` command flag][user_auth_flag] to deploy test resources, set either
220
-
`AZURE_TEST_USE_PWSH_AUTH` or `AZURE_TEST_USE_CLI_AUTH` to "true" to authenticate with Azure PowerShell or Azure CLI,
221
-
respectively. If both are set to true, Azure PowerShell will be used.
222
+
If you used the [`-UserAuth` command flag][user_auth_flag] to deploy test resources, choose a development tool to
223
+
authenticate with by setting an `AZURE_TEST_USE_*_AUTH` environment variable to "true". The following tools are supported, listed in the order that authentication will be attempted in if requested:
224
+
1. Azure PowerShell: set `AZURE_TEST_USE_PWSH_AUTH`.
225
+
2. Azure CLI (`az`): set `AZURE_TEST_USE_CLI_AUTH`.
226
+
3. Visual Studio Code: set `AZURE_TEST_USE_VSCODE_AUTH`.
227
+
4. Azure Developer CLI (`azd`): set `AZURE_TEST_USE_AZD_AUTH`.
222
228
223
229
If your service doesn't have a `test-resources` file for test deployment, you'll need to set environment variables
224
-
for authentication at minimum. For user-based authentication, use `AZURE_TEST_USE_PWSH_AUTH` or
225
-
`AZURE_TEST_USE_CLI_AUTH` as described above.
230
+
for authentication at minimum. For user-based authentication, use `AZURE_TEST_USE_*_AUTH` as described above.
226
231
227
232
For service principal authentication:
228
233
1. Set the `AZURE_SUBSCRIPTION_ID` variable to your organization's subscription ID. You can find it in the "Overview"
0 commit comments