Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/digitaltwins/digital-twins-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-credential": "^1.0.0",
"@azure-tools/test-recorder": "^1.0.0",
"@microsoft/api-extractor": "^7.18.11",
"@types/chai": "^4.1.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { ClientSecretCredential } from "@azure/identity";
import { DigitalTwinsClient } from "../../src";
import { env, record, RecorderEnvironmentSetup } from "@azure-tools/test-recorder";
import { uniqueString } from "./recorderUtils";
import TestClient from "./testClient";
import { createTestCredential } from "@azure-tools/test-credential";

export async function authenticate(that: Mocha.Context): Promise<any> {
const keySuffix = uniqueString();
Expand All @@ -25,11 +25,7 @@ export async function authenticate(that: Mocha.Context): Promise<any> {
queryParametersToSkip: [],
};
const recorder = record(that, recorderEnvSetup);
const credential = new ClientSecretCredential(
env.AZURE_TENANT_ID,
env.AZURE_CLIENT_ID,
env.AZURE_CLIENT_SECRET
);
const credential = createTestCredential();
const AZURE_DIGITALTWINS_URL = env.AZURE_DIGITALTWINS_URL;
const client = new DigitalTwinsClient(AZURE_DIGITALTWINS_URL, credential);
const testClient = new TestClient(client);
Expand Down