fix issue and change catalog from loadtestservice to loadtesting (#24858)

issue:https://github.com/Azure/azure-sdk-for-js/issues/24041
This commit is contained in:
kazrael2119 2023-02-15 15:12:31 +08:00 коммит произвёл GitHub
Родитель 1492237359
Коммит b2e7b22a7a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
194 изменённых файлов: 87 добавлений и 82 удалений

4
.github/CODEOWNERS поставляемый
Просмотреть файл

@ -833,8 +833,8 @@
/sdk/portal/ci.mgmt.yml @qiaozha @dw511214992 @MaryGao
# PRLabel: %Mgmt
/sdk/loadtestservice/arm-loadtestservice/ @qiaozha @dw511214992 @MaryGao
/sdk/loadtestservice/ci.mgmt.yml @qiaozha @dw511214992 @MaryGao
/sdk/loadtesting/arm-loadtestservice/ @qiaozha @dw511214992 @MaryGao
/sdk/loadtesting/ci.mgmt.yml @qiaozha @dw511214992 @MaryGao
# PRLabel: %Mgmt
/sdk/purview/arm-purview/ @qiaozha @dw511214992 @MaryGao

Просмотреть файл

@ -1860,7 +1860,7 @@
},
{
"packageName": "@azure-rest/load-testing",
"projectFolder": "sdk/loadtestservice/load-testing-rest",
"projectFolder": "sdk/loadtesting/load-testing-rest",
"versionPolicyName": "client"
},
{
@ -1885,7 +1885,7 @@
},
{
"packageName": "@azure/arm-loadtesting",
"projectFolder": "sdk/loadtestservice/arm-loadtesting",
"projectFolder": "sdk/loadtesting/arm-loadtesting",
"versionPolicyName": "management"
},
{

Просмотреть файл

@ -4,7 +4,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
LoadTest client provides access to LoadTest Resource and it's status operations.
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting) |
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/arm-loadtesting) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-loadtesting) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-loadtesting) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

Просмотреть файл

@ -111,7 +111,7 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/arm-loadtesting",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [

Просмотреть файл

@ -54,17 +54,17 @@ npx cross-env LOADTESTSERVICE_SUBSCRIPTION_ID="<loadtestservice subscription id>
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[loadtestscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsCreateOrUpdateSample.js
[loadtestsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsDeleteSample.js
[loadtestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsGetSample.js
[loadtestslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsListByResourceGroupSample.js
[loadtestslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsListBySubscriptionSample.js
[loadtestslistoutboundnetworkdependenciesendpointssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsListOutboundNetworkDependenciesEndpointsSample.js
[loadtestsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/loadTestsUpdateSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/operationsListSample.js
[quotascheckavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/quotasCheckAvailabilitySample.js
[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/quotasGetSample.js
[quotaslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/javascript/quotasListSample.js
[loadtestscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsCreateOrUpdateSample.js
[loadtestsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsDeleteSample.js
[loadtestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsGetSample.js
[loadtestslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsListByResourceGroupSample.js
[loadtestslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsListBySubscriptionSample.js
[loadtestslistoutboundnetworkdependenciesendpointssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsListOutboundNetworkDependenciesEndpointsSample.js
[loadtestsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/loadTestsUpdateSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/operationsListSample.js
[quotascheckavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/quotasCheckAvailabilitySample.js
[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/quotasGetSample.js
[quotaslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/javascript/quotasListSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-loadtesting?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting/README.md
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/arm-loadtesting/README.md

Просмотреть файл

@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
"directory": "sdk/loadtestservice/arm-loadtesting"
"directory": "sdk/loadtesting/arm-loadtesting"
},
"keywords": [
"node",
@ -23,7 +23,7 @@
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/arm-loadtesting",
"dependencies": {
"@azure/arm-loadtesting": "latest",
"dotenv": "latest",

Просмотреть файл

@ -66,18 +66,18 @@ npx cross-env LOADTESTSERVICE_SUBSCRIPTION_ID="<loadtestservice subscription id>
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[loadtestscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsCreateOrUpdateSample.ts
[loadtestsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsDeleteSample.ts
[loadtestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsGetSample.ts
[loadtestslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsListByResourceGroupSample.ts
[loadtestslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsListBySubscriptionSample.ts
[loadtestslistoutboundnetworkdependenciesendpointssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsListOutboundNetworkDependenciesEndpointsSample.ts
[loadtestsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/loadTestsUpdateSample.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/operationsListSample.ts
[quotascheckavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/quotasCheckAvailabilitySample.ts
[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/quotasGetSample.ts
[quotaslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/arm-loadtesting/samples/v1/typescript/src/quotasListSample.ts
[loadtestscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsCreateOrUpdateSample.ts
[loadtestsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsDeleteSample.ts
[loadtestsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsGetSample.ts
[loadtestslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsListByResourceGroupSample.ts
[loadtestslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsListBySubscriptionSample.ts
[loadtestslistoutboundnetworkdependenciesendpointssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsListOutboundNetworkDependenciesEndpointsSample.ts
[loadtestsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/loadTestsUpdateSample.ts
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/operationsListSample.ts
[quotascheckavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/quotasCheckAvailabilitySample.ts
[quotasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/quotasGetSample.ts
[quotaslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtesting/arm-loadtesting/samples/v1/typescript/src/quotasListSample.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-loadtesting?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting/README.md
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/arm-loadtesting/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html

Просмотреть файл

@ -13,7 +13,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
"directory": "sdk/loadtestservice/arm-loadtesting"
"directory": "sdk/loadtesting/arm-loadtesting"
},
"keywords": [
"node",
@ -27,7 +27,7 @@
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/arm-loadtesting",
"dependencies": {
"@azure/arm-loadtesting": "latest",
"dotenv": "latest",

Просмотреть файл

@ -8,8 +8,8 @@ trigger:
- hotfix/*
paths:
include:
- sdk/loadtestservice/ci.mgmt.yml
- sdk/loadtestservice/arm-loadtesting
- sdk/loadtesting/ci.mgmt.yml
- sdk/loadtesting/arm-loadtesting
pr:
branches:
include:
@ -21,12 +21,12 @@ pr:
- feature/v4
paths:
include:
- sdk/loadtestservice/ci.mgmt.yml
- sdk/loadtestservice/arm-loadtesting
- sdk/loadtesting/ci.mgmt.yml
- sdk/loadtesting/arm-loadtesting
extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: loadtestservice
ServiceDirectory: loadtesting
Artifacts:
- name: azure-arm-loadtesting
safeName: azurearmloadtesting

Просмотреть файл

@ -8,10 +8,10 @@ trigger:
- hotfix/*
paths:
include:
- sdk/loadtestservice/
- sdk/loadtesting/
exclude:
- sdk/loadtestservice/ci.mgmt.yml
- sdk/loadtestservice/arm-loadtesting
- sdk/loadtesting/ci.mgmt.yml
- sdk/loadtesting/arm-loadtesting
pr:
branches:
include:
@ -21,14 +21,14 @@ pr:
- hotfix/*
paths:
include:
- sdk/loadtestservice/
- sdk/loadtesting/
exclude:
- sdk/loadtestservice/ci.mgmt.yml
- sdk/loadtestservice/arm-loadtesting
- sdk/loadtesting/ci.mgmt.yml
- sdk/loadtesting/arm-loadtesting
extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: loadtestservice
ServiceDirectory: loadtesting
Artifacts:
- name: azure-rest-load-testing
safeName: azurerestloadtesting

Просмотреть файл

@ -100,12 +100,13 @@ In the above example, `eus` represents the Azure region `East US`.
```javascript
import { AzureLoadTestingClient } from "@azure-rest/load-testing";
import AzureLoadTesting from "@azure-rest/load-testing";
import { DefaultAzureCredential } from "@azure/identity";
var TEST_ID = "some-test-id";
var DISPLAY_NAME = "my-load-test";
const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential());
const client: AzureLoadTestingClient = AzureLoadTesting("<Endpoint>", new DefaultAzureCredential());
await client.path("/tests/{testId}", TEST_ID).patch({
contentType: "application/merge-patch+json",
@ -126,11 +127,13 @@ await client.path("/tests/{testId}", TEST_ID).patch({
### Uploading .jmx file to a Test
```javascript
import { AzureLoadTestingClient, getLongRunningPoller } from "@azure-rest/load-testing";
import { AzureLoadTestingClient, getLongRunningPoller, isUnexpected } from "@azure-rest/load-testing";
import AzureLoadTesting from "@azure-rest/load-testing";
import { AbortController } from "@azure/abort-controller";
import { DefaultAzureCredential } from "@azure/identity";
import { createReadStream } from "fs";
const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential());
const client: AzureLoadTestingClient = AzureLoadTesting("<Endpoint>", new DefaultAzureCredential());
var TEST_ID = "some-test-id";
const readStream = createReadStream("./sample.jmx");
@ -155,7 +158,7 @@ fileValidateResult = await fileValidatePoller.pollUntilDone({
new Error("Error in polling file Validation" + ex.message); //polling timed out
}
if (fileUploadPoller.getOperationState().status != "succeeded" && fileValidateResult)
if (fileValidatePoller.getOperationState().status != "succeeded" && fileValidateResult)
throw new Error(
"There is some issue in validation, please make sure uploaded file is a valid JMX." +
fileValidateResult.body.validationFailureDetails
@ -165,10 +168,12 @@ if (fileUploadPoller.getOperationState().status != "succeeded" && fileValidateRe
### Running a Test and fetching Metrics
```javascript
import { AzureLoadTestingClient, getLongRunningPoller } from "@azure-rest/load-testing";
import { AzureLoadTestingClient, getLongRunningPoller, isUnexpected } from "@azure-rest/load-testing";
import AzureLoadTesting from "@azure-rest/load-testing";
import { DefaultAzureCredential } from "@azure/identity";
import { AbortController } from "@azure/abort-controller";
const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential());
const client: AzureLoadTestingClient = AzureLoadTesting("<Endpoint>", new DefaultAzureCredential());
var TEST_ID = "some-test-id";
var DISPLAY_NAME = "my-load-test";
@ -210,7 +215,7 @@ const testRunPoller = await getLongRunningPoller(client, testRunCreationResult);
// get list of all metric namespaces and pick the first one
const metricNamespaces = await client
.path("/test-runs/{testRunId}/metric-namespaces", testRunId)
.path("/test-runs/{testRunId}/metric-namespaces", TEST_RUN_ID)
.get();
if (isUnexpected(metricNamespaces)) {
@ -225,7 +230,7 @@ const testRunPoller = await getLongRunningPoller(client, testRunCreationResult);
// get list of all metric definitions and pick the first one
const metricDefinitions = await client
.path("/test-runs/{testRunId}/metric-definitions", testRunId)
.path("/test-runs/{testRunId}/metric-definitions", TEST_RUN_ID)
.get({
queryParameters: {
metricNamespace: metricNamespace.name,
@ -243,7 +248,7 @@ const testRunPoller = await getLongRunningPoller(client, testRunCreationResult);
}
// fetch client metrics using metric namespace and metric name
const metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({
const metricsResult = await client.path("/test-runs/{testRunId}/metrics", TEST_RUN_ID).post({
queryParameters: {
metricname: metricDefinition.name,
metricNamespace: metricNamespace.name,
@ -288,8 +293,8 @@ For details on contributing to this repository, see the [contributing guide](htt
<!-- LINKS -->
[source_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/src
[sample_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta
[source_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/load-testing-rest/src
[sample_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/load-testing-rest/samples/v1-beta
[api_reference_doc]: https://docs.microsoft.com/rest/api/loadtesting/
[product_documentation]: https://azure.microsoft.com/services/load-testing/
[azure_subscription]: https://azure.microsoft.com/free/

Просмотреть файл

@ -118,7 +118,7 @@
"uuid": "^9.0.0",
"typescript": "~4.8.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtesting/load-testing-rest/README.md",
"//metadata": {
"constantPaths": [
{

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше