File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
sdk/digitaltwins/digital-twins-core Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 7474 "@azure/dev-tool" : " ^1.0.0" ,
7575 "@azure/eslint-plugin-azure-sdk" : " ^3.0.0" ,
7676 "@azure/identity" : " ^2.0.1" ,
77+ "@azure-tools/test-credential" : " ^1.0.0" ,
7778 "@azure-tools/test-recorder" : " ^1.0.0" ,
7879 "@microsoft/api-extractor" : " ^7.18.11" ,
7980 "@types/chai" : " ^4.1.6" ,
Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation.
22// Licensed under the MIT license.
33
4- import { ClientSecretCredential } from "@azure/identity" ;
54import { DigitalTwinsClient } from "../../src" ;
65import { env , record , RecorderEnvironmentSetup } from "@azure-tools/test-recorder" ;
76import { uniqueString } from "./recorderUtils" ;
87import TestClient from "./testClient" ;
8+ import { createTestCredential } from "@azure-tools/test-credential" ;
99
1010export async function authenticate ( that : Mocha . Context ) : Promise < any > {
1111 const keySuffix = uniqueString ( ) ;
@@ -25,11 +25,7 @@ export async function authenticate(that: Mocha.Context): Promise<any> {
2525 queryParametersToSkip : [ ] ,
2626 } ;
2727 const recorder = record ( that , recorderEnvSetup ) ;
28- const credential = new ClientSecretCredential (
29- env . AZURE_TENANT_ID ,
30- env . AZURE_CLIENT_ID ,
31- env . AZURE_CLIENT_SECRET
32- ) ;
28+ const credential = createTestCredential ( ) ;
3329 const AZURE_DIGITALTWINS_URL = env . AZURE_DIGITALTWINS_URL ;
3430 const client = new DigitalTwinsClient ( AZURE_DIGITALTWINS_URL , credential ) ;
3531 const testClient = new TestClient ( client ) ;
You can’t perform that action at this time.
0 commit comments