[Unified Recorder] New test-utils package for test credential#19423
[Unified Recorder] New test-utils package for test credential#19423HarshaNalluru merged 29 commits intoAzure:mainfrom
test-utils package for test credential#19423Conversation
Co-authored-by: Zachary Foster <zfoster@users.noreply.github.com>
Rename function to match the credential being used
…to harshan/issue/recorder/19387
… harshan/issue/recorder/19387
test-utils package for test credential
| "packageName": "@azure-tools/identity-extensions", | ||
| "projectFolder": "sdk/test-utils/identity-extensions", | ||
| "versionPolicyName": "utility" | ||
| }, |
|
|
||
| import { ClientSecretCredential } from "@azure/identity"; | ||
| import { env, isPlaybackMode } from "@azure-tools/test-recorder"; | ||
| import { NoOpCredential } from "@azure-tools/test-recorder-new"; |
There was a problem hiding this comment.
Shouldn’t NoOpCredential be moved to this package?
There was a problem hiding this comment.
Hmm, can be done
witemple-msft
left a comment
There was a problem hiding this comment.
Very nice to see this quickly.
| "@azure/core-auth": "^1.3.2", | ||
| "@azure-tools/test-recorder": "^1.0.0", | ||
| "@azure-tools/test-recorder-new": "1.0.0", | ||
| "@azure/identity": "^2.0.1" |
There was a problem hiding this comment.
Identity currently uses the recorder. Wouldn’t it be an issue?
There was a problem hiding this comment.
identity depends on
- recorder
test-utils/identity-extensions depends on
- recorder
- identity
every other SDK will depend on
- recorder
- identity
- test-utils/identity-extensions
There was a problem hiding this comment.
identity doesn't depend on test-utils/identity-extensions, so there should not be a problem
Co-authored-by: Will Temple <witemple@microsoft.com>
Co-authored-by: Will Temple <witemple@microsoft.com>
Co-authored-by: Will Temple <witemple@microsoft.com>
Co-authored-by: Will Temple <witemple@microsoft.com>
Co-authored-by: Will Temple <witemple@microsoft.com>
…shaNalluru/azure-sdk-for-js into harshan/issue/recorder/19387
| * - returns the ClientSecretCredential (expects AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET in your environment or in the .env file) | ||
| * - AAD traffic won't be recorded if this credential is used. | ||
| */ | ||
| export function createTestCredential() { |
There was a problem hiding this comment.
please take an optional TokenCredentialOptions parameter.
There was a problem hiding this comment.
I haven't seen the need to use the persistence option, but @sadasant can advise here.
There was a problem hiding this comment.
I would leave it as TokenCredentialOptions to avoid guaranteeing that this API uses CSC in the back end. I am optimistic that we can eventually make this work with DefaultAzureCredential, even if we have to plumb something through the karma request pipeline.
|
modify servicefabricmesh parameters (Azure#19423) Co-authored-by: ZiWei Chen (WICRESOFT NORTH AMERICA LTD) <v-ziweichen@microsoft.com>

Provides the credential to be used in the tests.
NoOpCredentialin playback andClientSecretCredentialin record/live modes.Fixes #19387