Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[identity] Various test fixes #31764

Merged
merged 3 commits into from
Nov 14, 2024
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
2 changes: 1 addition & 1 deletion sdk/identity/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:managed-identity": "dev-tool run test:vitest -- --test-timeout 180000 'test/integration/**/*.spec.ts'",
"integration-test:managed-identity": "dev-tool run test:vitest -- --test-timeout 180000 --config ./vitest.managed-identity.config.ts",
"integration-test:node": "dev-tool run test:vitest -- --test-timeout 180000 'test/public/node/*.spec.ts' 'test/internal/node/*.spec.ts'",
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.
import { execSync } from "child_process";
import { isLiveMode } from "@azure-tools/test-recorder";
import { describe, it, assert, expect, vi, beforeEach, afterEach, beforeAll } from "vitest";
import { describe, it, assert, beforeEach } from "vitest";

describe("Azure Kubernetes Integration test", function () {
let podOutput: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { env } from "@azure-tools/test-recorder";
import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
import { ClientSecretCredential } from "../../../src/credentials/clientSecretCredential.js";
import { IdentityClient } from "../../../src/client/identityClient.js";
import { describe, it, assert, expect, vi, beforeEach, afterEach } from "vitest";
import { describe, it, assert, beforeEach, afterEach } from "vitest";

describe("MultiTenantAuthentication", function () {
let cleanup: MsalTestCleanup;
Expand All @@ -24,7 +24,7 @@ describe("MultiTenantAuthentication", function () {
await cleanup();
});

it("supports calling graph with client secret", async function () {
it("supports calling graph with client secret", async function (ctx) {
const [tenantId, clientId, clientSecret] = [
env.AZURE_IDENTITY_MULTI_TENANT_TENANT_ID,
env.AZURE_IDENTITY_MULTI_TENANT_CLIENT_ID,
Expand Down
14 changes: 14 additions & 0 deletions sdk/identity/identity/vitest.managed-identity.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";

export default mergeConfig(
viteConfig,
defineConfig({
test: {
include: ["test/integration/**/*.spec.ts"],
},
}),
);