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

[mgmt] revert test cases #32409

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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/analysisservices/arm-analysisservices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/astro/arm-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
7 changes: 0 additions & 7 deletions sdk/astro/arm-astro/test/astro_operations_test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ describe("Astro test", () => {
let recorder: Recorder;
let subscriptionId: string;
let client: AstroManagementClient;
let location: string;
let resourceGroup: string;
let resourcename: string;

beforeEach(async function (ctx) {
recorder = new Recorder(ctx);
Expand All @@ -50,10 +47,6 @@ describe("Astro test", () => {
// This is an example of how the environment variables are used
const credential = createTestCredential();
client = new AstroManagementClient(credential, subscriptionId, recorder.configureClientOptions({}));
location = "eastus";
resourceGroup = "myjstest";
resourcename = "resourcetest";

});

afterEach(async function () {
Expand Down
2 changes: 1 addition & 1 deletion sdk/attestation/arm-attestation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe("Attestation test", () => {
});

it("attestationProviders delete test", async function () {
await client.attestationProviders.delete(resourceGroup, providerName)
const res = await client.attestationProviders.listByResourceGroup(resourceGroup)
assert.equal(res.value?.length, 0);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/authorization/arm-authorization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ describe("Authorization test", () => {
let recorder: Recorder;
let subscriptionId: string;
let client: AuthorizationManagementClient;
let location: string;
let resourceGroup: string;
let resourcename: string;
let roleDefinitionId: string;
Expand All @@ -52,7 +51,6 @@ describe("Authorization test", () => {
// This is an example of how the environment variables are used
const credential = createTestCredential();
client = new AuthorizationManagementClient(credential, subscriptionId, recorder.configureClientOptions({}));
location = "eastus";
resourceGroup = "myjstest";
resourcename = "resourcetest";
roleDefinitionId = "roleDefinitionId";
Expand All @@ -63,7 +61,7 @@ describe("Authorization test", () => {
await recorder.stop();
});

it("roleDefinitions create test", async function () {
it.skip("roleDefinitions create test", async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why skip this?

Copy link
Contributor Author

@kazrael2119 kazrael2119 Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@qiaozha qiaozha Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpodwysocki do you think we should enable allowOnly by default? I feel like this is a behaviour breaking between vitest and mocha ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's fine, we can enable it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to allow .only for a few management packages, or all of them? If it is just a few of them, I prefer setting allowOnly for individual packages. Because it is easy to commit and merge a .only that is meant for local testing if we allow for all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait I am confused. If .only worked locally, why would it fail in CI?

const res = await client.roleDefinitions.createOrUpdate(
scope,
roleDefinitionId,
Expand All @@ -72,21 +70,22 @@ describe("Authorization test", () => {
assert.equal(res.name, resourcename);
});

it("roleDefinitions get test", async function () {
it.skip("roleDefinitions get test", async function () {
const res = await client.roleDefinitions.get(scope, roleDefinitionId);
assert.equal(res.name, resourcename);
});

it.only("roleDefinitions list test", async function () {
it("roleDefinitions list test", async function () {
const resArray = new Array();
for await (let item of client.roleDefinitions.list(scope)) {
resArray.push(item);
}
assert.notEqual(resArray.length, 0);
});

it("roleDefinitions delete test", async function () {
it.skip("roleDefinitions delete test", async function () {
const resArray = new Array();
await client.roleDefinitions.delete(scope, resourcename);
for await (let item of client.roleDefinitions.list(scope)) {
resArray.push(item);
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/automanage/arm-automanage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/automation/arm-automation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ describe("automation test", () => {
});

it("RunbookDraft get test", async function () {
// console.log(res)
const res = await client.runbookDraftOperations.getContent(resourceGroup, automationAccountName, runbookName)
console.log(res)

});

it.skip("RunbookDraft Replace test", async function () {

await client.runbookDraftOperations.beginReplaceContentAndWait(resourceGroup, automationAccountName, runbookName, runbookContent, testPollingOptions)
});

it("Runbook delete test", async function () {
await client.runbookOperations.delete(resourceGroup, automationAccountName, runbookName)
const resArray = new Array();
for await (let item of client.runbookOperations.listByAutomationAccount(resourceGroup, automationAccountName)) {
resArray.push(item);
Expand All @@ -112,6 +114,7 @@ describe("automation test", () => {
});

it("automation delete test", async function () {
await client.automationAccountOperations.delete(resourceGroup, automationAccountName)
const resArray = new Array();
for await (let item of client.automationAccountOperations.listByResourceGroup(resourceGroup)) {
resArray.push(item);
Expand Down
2 changes: 1 addition & 1 deletion sdk/avs/arm-avs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
3 changes: 2 additions & 1 deletion sdk/avs/arm-avs/test/avs_examples.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("avs test", () => {
testPollingOptions
);
assert.equal(res.name, privateCloudName);
}).timeout(36000000);
});

it.skip("privateClouds get test", async function () {
const res = await client.privateClouds.get(resourceGroup, privateCloudName);
Expand All @@ -105,6 +105,7 @@ describe("avs test", () => {

it.skip("privateClouds delete test", async function () {
const resArray = new Array();
await client.privateClouds.beginDeleteAndWait(resourceGroup, privateCloudName, testPollingOptions);
for await (let item of client.privateClouds.listInSubscription()) {
resArray.push(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/databox/arm-databox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ describe("DataBox test", () => {
let recorder: Recorder;
let subscriptionId: string;
let client: DataBoxManagementClient;
let location: string;
let resourceGroup: string;
let resourcename: string;

beforeEach(async function (ctx) {
recorder = new Recorder(ctx);
Expand All @@ -50,10 +47,6 @@ describe("DataBox test", () => {
// This is an example of how the environment variables are used
const credential = createTestCredential();
client = new DataBoxManagementClient(credential, subscriptionId, recorder.configureClientOptions({}));
location = "eastus";
resourceGroup = "myjstest";
resourcename = "resourcetest";

});

afterEach(async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/databoxedge/arm-databoxedge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/databricks/arm-databricks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("Databricks test", () => {
// This is an example of how the environment variables are used
const credential = createTestCredential();
client = new AzureDatabricksManagementClient(credential, subscriptionId, recorder.configureClientOptions({}));
location = "eastus";
location = "westus";
resourceGroup = "myjstest";
resourceGroup2 = "myjstest2";
workSpaceName = "myworkspacexx";
Expand All @@ -64,7 +64,7 @@ describe("Databricks test", () => {
it("workspaces create test", async function () {
const res = await client.workspaces.beginCreateOrUpdateAndWait(resourceGroup, workSpaceName, {
managedResourceGroupId: "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup2,
location: "westus",
location,
sku: {
name: "Standard"
}
Expand All @@ -90,5 +90,6 @@ describe("Databricks test", () => {
});

it("workspaces delete test", async function () {
await client.workspaces.beginDeleteAndWait(resourceGroup, workSpaceName, testPollingOptions);
});
});
2 changes: 1 addition & 1 deletion sdk/datacatalog/arm-datacatalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
Expand Down
Loading