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

Add SDK for Tiering #26121

Merged
merged 24 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c7f122d
Rush config files
classBabacar-msft May 18, 2023
1770290
SDK for tiering
classBabacar-msft May 18, 2023
e2f8099
autorest code for tiering
classBabacar-msft May 26, 2023
4bf82ff
updating swagger
classBabacar-msft May 26, 2023
514f781
updating swagger.json
classBabacar-msft Jun 1, 2023
5236e53
Changing function name in client
classBabacar-msft Jun 1, 2023
03bde07
updating samples
classBabacar-msft Jun 5, 2023
bb256fc
generated code
classBabacar-msft Jun 5, 2023
00711a1
api extractor
classBabacar-msft Jun 5, 2023
ab99bc8
updating the swagger
classBabacar-msft Jun 5, 2023
88021ff
tests
classBabacar-msft Jun 5, 2023
aebd56f
coverage generator
classBabacar-msft Jun 5, 2023
ce6b226
adding documentation
classBabacar-msft Jun 5, 2023
8e4848b
removing apiref
classBabacar-msft Jun 5, 2023
81c9c95
Merge branch 'main' into bndoye/sdkForTiering
classBabacar-msft Jun 6, 2023
96581d0
rush updating
classBabacar-msft Jun 7, 2023
1dc9f70
Adding unknown word and editing readme
classBabacar-msft Jun 8, 2023
6e42803
Merge branch 'main' into bndoye/sdkForTiering
classBabacar-msft Jun 12, 2023
ab11c86
Addressing PR Comments
classBabacar-msft Jun 14, 2023
82ec663
updating beta version
classBabacar-msft Jun 14, 2023
3398bab
versioning
classBabacar-msft Jun 14, 2023
f1df02f
Merge branch 'main' into bndoye/sdkForTiering
classBabacar-msft Jun 15, 2023
16e6e94
Adding environment variables to test
classBabacar-msft Jun 16, 2023
4130fc8
Removing hardcoded environment variable for tests
classBabacar-msft Jun 16, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT license.

import { Context } from "mocha";
import { Recorder } from "@azure-tools/test-recorder";
import { Recorder, env } from "@azure-tools/test-recorder";
import { TieringClient } from "../../src";
import { assert } from "chai";
import { createRecordedClient } from "./utils/recordedClient";
Expand All @@ -23,7 +23,7 @@ describe(`TieringClient - Get Acquired Number Limits`, function () {

it("get acquired number limits", async function () {
// print all acquire number limits
const resourceId = "9d787bd6-07fc-4c7b-8e57-17f1fee41298";
const resourceId = env.RESOURCE_ID || "9d787bd6-07fc-4c7b-8e57-17f1fee41298";
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest avoiding hardcoding this value and simply read from the env vars. In any case, in recordedClient.ts you are already setting up this same GUID as the value for env.RESOURCE_ID whenever running in playback mode, which should be more than enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok that makes sense

const acquiredNumberLimits = await client.getAcquiredNumberLimits(resourceId);
assert.isNotNull(acquiredNumberLimits);
}).timeout(10000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT license.

import { Context } from "mocha";
import { Recorder } from "@azure-tools/test-recorder";
import { Recorder, env } from "@azure-tools/test-recorder";
import { TieringClient } from "../../src";
import { assert } from "chai";
import { createRecordedClient } from "./utils/recordedClient";
Expand All @@ -23,7 +23,7 @@ describe(`TieringClient - Get Tier Info`, function () {

it("get tier info", async function () {
// print all tier info
const resourceId = "9d787bd6-07fc-4c7b-8e57-17f1fee41298";
const resourceId = env.RESOURCE_ID || "9d787bd6-07fc-4c7b-8e57-17f1fee41298";
const tierInfo = await client.getTierByResourceId(resourceId);
assert.isNotNull(tierInfo);
}).timeout(10000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const envSetupForPlayback: { [k: string]: string } = {
AZURE_CLIENT_ID: "SomeClientId",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "SomeTenantId",
RESOURCE_ID: "9d787bd6-07fc-4c7b-8e57-17f1fee41298"
};

export const recorderOptions: RecorderStartOptions = {
Expand Down