Skip to content

Commit 662511c

Browse files
author
SDKAuto
committed
CodeGen from PR 19716 in Azure/azure-rest-api-specs
Merge b694193635220431592e54aea59137a812db4886 into 432872fac1d0f8edcae98a0e8504afc0ee302710
1 parent 9291030 commit 662511c

File tree

5 files changed

+34
-51
lines changed

5 files changed

+34
-51
lines changed

sdk/mariadb/arm-mariadb/_meta.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "d967edeee8fd6af6d40bffe53cceed1bd053d7ad",
3-
"readme": "specification\\mariadb\\resource-manager\\readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mariadb\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true",
2+
"commit": "a26a5fddefa7f74172535a1e8d1f47fa1d41552f",
3+
"readme": "specification/mariadb/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mariadb/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
7-
"use": "@autorest/typescript@6.0.0-alpha.19.20220408.1"
8-
}
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.0",
7+
"use": "@autorest/typescript@6.0.0-alpha.19.20220425.1"
8+
}

sdk/mariadb/arm-mariadb/package.json

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for MariaDBManagementClient.",
6-
"version": "2.0.1",
6+
"version": "2.0.2",
77
"engines": {
88
"node": ">=12.0.0"
99
},
@@ -40,9 +40,11 @@
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
4242
"@azure/identity": "^2.0.1",
43-
"@azure-tools/test-recorder": "^1.0.0",
43+
"@azure-tools/test-recorder": "^2.0.0",
44+
"@azure-tools/test-credential": "^1.0.0",
4445
"mocha": "^7.1.1",
45-
"cross-env": "^7.0.2"
46+
"cross-env": "^7.0.2",
47+
"@azure/dev-tool": "^1.0.0"
4648
},
4749
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mariadb/arm-mariadb",
4850
"repository": {
@@ -93,7 +95,7 @@
9395
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
9496
"unit-test:browser": "echo skipped",
9597
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
96-
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
98+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
9799
"integration-test:browser": "echo skipped",
98100
"docs": "echo skipped"
99101
},
@@ -106,13 +108,5 @@
106108
}
107109
]
108110
},
109-
"autoPublish": true,
110-
"//sampleConfiguration": {
111-
"productName": "",
112-
"productSlugs": [
113-
"azure"
114-
],
115-
"disableDocsMs": true,
116-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mariadb?view=azure-node-preview"
117-
}
118-
}
111+
"autoPublish": true
112+
}

sdk/mariadb/arm-mariadb/src/mariaDBManagementClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class MariaDBManagementClient extends coreClient.ServiceClient {
101101
credential: credentials
102102
};
103103

104-
const packageDetails = `azsdk-js-arm-mariadb/2.0.1`;
104+
const packageDetails = `azsdk-js-arm-mariadb/2.0.2`;
105105
const userAgentPrefix =
106106
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
107107
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`

sdk/mariadb/arm-mariadb/test/sampleTest.ts

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,30 @@
77
*/
88

99
import {
10-
env,
11-
record,
12-
RecorderEnvironmentSetup,
13-
Recorder
10+
Recorder,
11+
RecorderStartOptions,
12+
env
1413
} from "@azure-tools/test-recorder";
15-
import * as assert from "assert";
14+
import { assert } from "chai";
15+
import { Context } from "mocha";
1616

17-
const recorderEnvSetup: RecorderEnvironmentSetup = {
18-
replaceableVariables: {
19-
AZURE_CLIENT_ID: "azure_client_id",
20-
AZURE_CLIENT_SECRET: "azure_client_secret",
21-
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
22-
SUBSCRIPTION_ID: "azure_subscription_id"
23-
},
24-
customizationsOnRecordings: [
25-
(recording: any): any =>
26-
recording.replace(
27-
/"access_token":"[^"]*"/g,
28-
`"access_token":"access_token"`
29-
)
30-
],
31-
queryParametersToSkip: []
17+
const replaceableVariables: Record<string, string> = {
18+
AZURE_CLIENT_ID: "azure_client_id",
19+
AZURE_CLIENT_SECRET: "azure_client_secret",
20+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
21+
SUBSCRIPTION_ID: "azure_subscription_id"
22+
};
23+
24+
const recorderOptions: RecorderStartOptions = {
25+
envSetupForPlayback: replaceableVariables
3226
};
3327

3428
describe("My test", () => {
3529
let recorder: Recorder;
3630

37-
beforeEach(async function() {
38-
recorder = record(this, recorderEnvSetup);
31+
beforeEach(async function(this: Context) {
32+
recorder = new Recorder(this.currentTest);
33+
await recorder.start(recorderOptions);
3934
});
4035

4136
afterEach(async function() {

sdk/mariadb/arm-mariadb/tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@
1515
],
1616
"declaration": true,
1717
"outDir": "./dist-esm",
18-
"importHelpers": true,
19-
"paths": {
20-
"@azure/arm-mariadb": [
21-
"./src/index"
22-
]
23-
}
18+
"importHelpers": true
2419
},
2520
"include": [
2621
"./src/**/*.ts",
27-
"./test/**/*.ts",
28-
"samples-dev/**/*.ts"
22+
"./test/**/*.ts"
2923
],
3024
"exclude": [
3125
"node_modules"

0 commit comments

Comments
 (0)