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

[Unified Recorder] Call proxy-tool through dev-tool #18322

Merged
merged 80 commits into from
Nov 20, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
15ed59e
test-proxy starter code for starting
HarshaNalluru Oct 20, 2021
f5a9992
adding in the requirements
HarshaNalluru Oct 20, 2021
946bf0b
test-proxy starter code for starting
HarshaNalluru Oct 20, 2021
29ad0f3
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Oct 22, 2021
4bbc37e
clean up
HarshaNalluru Oct 22, 2021
fc25043
gets RootLocation
HarshaNalluru Oct 22, 2021
4f0f2e6
os.platform() === "win32" check
HarshaNalluru Oct 22, 2021
09a20ea
cleanup
HarshaNalluru Oct 22, 2021
e69fa22
testProxyUtils.ts
HarshaNalluru Oct 23, 2021
be70341
checkpoint
HarshaNalluru Oct 26, 2021
0938dc7
node side looks like it's working ✔️
HarshaNalluru Oct 26, 2021
950f46b
readme formatting
HarshaNalluru Oct 26, 2021
fcd64ff
same console.log in win and lin
HarshaNalluru Oct 26, 2021
074bfe4
test:node-with-proxy
HarshaNalluru Oct 27, 2021
5f407f9
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Oct 27, 2021
ce99f54
"sdk-type": "utility",
HarshaNalluru Oct 27, 2021
cb3342d
lock file
HarshaNalluru Oct 27, 2021
4285651
"sdk-type": "utility",
HarshaNalluru Oct 27, 2021
4adb560
Merge branch 'harshan/issue/18401' of https://github.com/HarshaNallur…
HarshaNalluru Oct 28, 2021
acd56a9
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Oct 28, 2021
ddd3b7b
lock file
HarshaNalluru Oct 28, 2021
a7147c2
dev-tool test:browser
HarshaNalluru Oct 28, 2021
da195a1
dotenv.config() call not needed since dev-tool does it by default
HarshaNalluru Oct 28, 2021
378a342
run subcommand
HarshaNalluru Oct 28, 2021
803a205
Partly switching to "fs-extra"
HarshaNalluru Oct 28, 2021
91f8a53
fsExtra -> fs
HarshaNalluru Oct 28, 2021
1c46de2
test:node-{js|ts}-input
HarshaNalluru Oct 28, 2021
4469c36
default options
HarshaNalluru Oct 28, 2021
d204966
--single-run
HarshaNalluru Oct 28, 2021
b986e5f
remove dev-tool shortcut
HarshaNalluru Oct 28, 2021
0be5730
runOnlyTestCommand
HarshaNalluru Oct 28, 2021
25968e7
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Oct 28, 2021
bc48123
dedeuplicate with shouldRunProxyTool and runTestsWithProxyTool methods
HarshaNalluru Oct 28, 2021
f2e1fbf
minor changes
HarshaNalluru Oct 29, 2021
b0cda6a
add console.logs
HarshaNalluru Oct 29, 2021
77e8229
--mocha=\"--whatever\" and refactoring
HarshaNalluru Oct 29, 2021
660ae89
simplify test scripts
HarshaNalluru Oct 29, 2021
a6d1dea
more refactoring
HarshaNalluru Oct 29, 2021
63cdb75
unintended duplication
HarshaNalluru Oct 29, 2021
94e4e0d
const sdkType = contents["sdk-type"];
HarshaNalluru Oct 29, 2021
6ce7ec8
dead code
HarshaNalluru Oct 29, 2021
f6a62c6
removing the if check
HarshaNalluru Oct 29, 2021
41fcb8d
use an array instead
HarshaNalluru Oct 29, 2021
dd0161c
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Oct 30, 2021
7af4f16
lock file
HarshaNalluru Oct 30, 2021
210ed4d
"sdk-type": "utility",
HarshaNalluru Nov 1, 2021
bed8368
"sdk-type": "utility",
HarshaNalluru Nov 1, 2021
79ddd0f
Merge branch 'harshan/issue/18401' of https://github.com/HarshaNallur…
HarshaNalluru Nov 1, 2021
ad06342
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Nov 1, 2021
2f1ab3e
lock file
HarshaNalluru Nov 1, 2021
3817355
npm run integration-test:node
HarshaNalluru Nov 1, 2021
c3e44cb
js -> ts
HarshaNalluru Nov 1, 2021
788a308
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Nov 8, 2021
e4f1ed0
lock file
HarshaNalluru Nov 8, 2021
881b3fc
moving commands/run/testUtils.ts -> src/util/testUtils.ts
HarshaNalluru Nov 8, 2021
baeea7d
lock file
HarshaNalluru Nov 10, 2021
fce7d97
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Nov 11, 2021
c40196d
lock file
HarshaNalluru Nov 11, 2021
80df60b
bug fix
HarshaNalluru Nov 11, 2021
58fc8d8
PROXY_MANUAL_START
HarshaNalluru Nov 12, 2021
b074e27
getTestMode
HarshaNalluru Nov 16, 2021
348e1c1
readme
HarshaNalluru Nov 16, 2021
8dddf51
lock file from main
HarshaNalluru Nov 16, 2021
6713590
lock file
HarshaNalluru Nov 16, 2021
cb6c383
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Nov 17, 2021
35a39a3
dump logs
HarshaNalluru Nov 17, 2021
37d151d
fix windows path
HarshaNalluru Nov 17, 2021
e5d4ff0
PROXY_MANUAL_START in karma.conf
HarshaNalluru Nov 17, 2021
a192f99
duplication
HarshaNalluru Nov 17, 2021
5258da3
clean karma conf
HarshaNalluru Nov 17, 2021
a76fcc2
clean package.json
HarshaNalluru Nov 17, 2021
83f9d37
waits for the proxy tool - draft
HarshaNalluru Nov 17, 2021
f124e79
wait-for-proxy-endpoint finish
HarshaNalluru Nov 17, 2021
2283626
Update sdk/test-utils/recorder-new/test/testProxyTests.spec.ts
HarshaNalluru Nov 17, 2021
b790604
beautify the tests
HarshaNalluru Nov 17, 2021
9743b8f
Merge branch 'harshan/issue/17042' of https://github.com/HarshaNallur…
HarshaNalluru Nov 17, 2021
213a315
fix the test mode log
HarshaNalluru Nov 17, 2021
99300d4
minor updates to tests
HarshaNalluru Nov 17, 2021
227e21c
test-info
HarshaNalluru Nov 19, 2021
7696173
no need to pass test mode
HarshaNalluru Nov 19, 2021
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
3,315 changes: 1,747 additions & 1,568 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions common/tools/dev-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"private": true,
"prettier": "../eslint-plugin-azure-sdk/prettier.json",
"dependencies": {
"concurrently": "^6.3.0",
"chalk": "~4.1.1",
"dotenv": "^8.2.0",
"fs-extra": "^8.1.0",
Expand All @@ -55,6 +56,7 @@
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@types/concurrently": "^6.3.0",
"@types/chai": "^4.1.6",
"@types/chai-as-promised": "^7.1.0",
"@types/fs-extra": "^8.0.0",
Expand Down
4 changes: 3 additions & 1 deletion common/tools/dev-tool/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const log = createPrinter("dev-tool");
export const baseCommands = {
about: () => import("./about"),
package: () => import("./package"),
samples: () => import("./samples")
samples: () => import("./samples"),
"test-proxy": () => import("./test-proxy"),
"test:node": () => import("./testNode")
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
} as const;

/**
Expand Down
13 changes: 13 additions & 0 deletions common/tools/dev-tool/src/commands/test-proxy/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license

import { subCommand, makeCommandInfo } from "../../framework/command";

export const commandInfo = makeCommandInfo(
"test-proxy",
"runs the proxy-tool with the `docker run ...` command"
);

export default subCommand(commandInfo, {
start: () => import("./start")
});
38 changes: 38 additions & 0 deletions common/tools/dev-tool/src/commands/test-proxy/start.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { leafCommand, makeCommandInfo } from "../../framework/command";
import { config } from "dotenv";
import { isProxyToolActive, startProxyTool } from "../../util/testProxyUtils";
config();

export const commandInfo = makeCommandInfo(
"test-proxy",
"runs the proxy-tool with the `docker run ...` command",
{}
);

export default leafCommand(commandInfo, async (_options) => {
const mode = process.env.TEST_MODE;
if (mode === "live") {
return true; // No need to start the proxy tool in the live mode
} else {
try {
await isProxyToolActive();
// No need to run a new one if it is already active
// Especially, CI uses this path
console.log(
`Proxy tool seems to be active, not attempting to start the test proxy at http://localhost:5000 & https://localhost:5001.\n`
);
return true;
} catch (error) {
if ((error as { code: string }).code === "ECONNREFUSED") {
// Proxy tool is not active, attempt to start the proxy tool now
await startProxyTool(mode);
return true;
} else {
throw error;
}
}
}
});
72 changes: 72 additions & 0 deletions common/tools/dev-tool/src/commands/testNode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license

import { leafCommand, makeCommandInfo } from "../framework/command";
import concurrently from "concurrently";
import { config } from "dotenv";
import { isProxyToolActive } from "../util/testProxyUtils";
config();
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved

export const commandInfo = makeCommandInfo(
"test:node",
"runs the node tests using mocha with the default and the provided options; starts the proxy-tool in record and playback modes",
{
"mocha-options": {
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
kind: "string",
description: "Mocha options along with the test files(glob pattern) as expected by mocha",
default: ""
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
}
}
);

export default leafCommand(commandInfo, async (_) => {
if (process.argv[3] !== "--mocha-options" && !process.argv[4]) {
throw new Error(
"unexpected command provided; expected = `dev-tool test:node --mocha-options '<options>'`"
);
}
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved

const testProxyStart = "dev-tool test-proxy start";
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
const mochaCMDWithDefaults =
"nyc mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace";
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
const mochaCommand = `${mochaCMDWithDefaults} ${process.argv[4]}`;
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved

let runOnlyMochaCommand = false; // Boolean to figure out if we need to run just the mocha command or the test-proxy too

const mode = process.env.TEST_MODE;
if (mode === "live") {
runOnlyMochaCommand = true; // No need to start the proxy tool in the live mode
} else {
try {
await isProxyToolActive();
// No need to run a new one if it is already active
// Especially, CI uses this path
console.log(
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
`Proxy tool seems to be active, not attempting to start the test proxy at http://localhost:5000 & https://localhost:5001.\n`
);
runOnlyMochaCommand = true;
} catch (error) {
if ((error as { code: string }).code === "ECONNREFUSED") {
// Proxy tool is not active, attempt to start the proxy tool now
runOnlyMochaCommand = false;
} else {
throw error;
}
}
}

const mochaCommandObj: concurrently.CommandObj = {
command: mochaCommand,
name: "node-tests"
};

if (runOnlyMochaCommand) {
await concurrently([mochaCommandObj]);
} else {
await concurrently([{ command: testProxyStart, name: "test-proxy" }, mochaCommandObj], {
killOthers: ["failure", "success"],
successCondition: "first"
});
}
return true;
});
92 changes: 92 additions & 0 deletions common/tools/dev-tool/src/util/testProxyUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { spawn } from "child_process";
import fs from "fs";
import path from "path";
import { IncomingMessage, request, RequestOptions } from "http";
Copy link
Member

Choose a reason for hiding this comment

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

I'm in favor of using a simpler HTTP client in dev-tool such as axios.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only HTTP request that is made in the whole of dev-tool.
I don't want to take a dependency on another package if this serves my purpose.

Copy link
Member

Choose a reason for hiding this comment

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

Very well, When/if we have more HTTP usage I'd like to replace it with axios, node-fetch, etc. (something a little bit more "batteries-included").

Copy link
Contributor

Choose a reason for hiding this comment

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

core-rest-pipelines should help 🤔 at least in the future

Copy link
Member Author

Choose a reason for hiding this comment

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

That'll add circular dependencies @sadasant.
core packages depend on dev-tool

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want to use core for incidental stuff in dev-tool. It's designed for the client libraries and unless we really have some kind of request pipeline in dev-tool where performance and consistent configurability with the clients is important, I think it'll be nicer to just use a simple API.

Copy link
Contributor

Choose a reason for hiding this comment

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

That'll add circular dependencies @sadasant.

Not if you pin a version 🤔 since dev-tools is only a devDependency. But I agree with Will 👍


export async function startProxyTool(mode: string | undefined) {
const outFileName = "test-proxy-output.log";
const out = fs.openSync(`./${outFileName}`, "a");
const err = fs.openSync(`./${outFileName}`, "a");
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved

console.log(`===TEST_MODE="${mode}"===`);
console.log(
`Attempting to start test proxy at http://localhost:5000 & https://localhost:5001.\n`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these ports be parametrized?

Copy link
Member Author

Choose a reason for hiding this comment

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

Logged an issue for this at #15829, will tackle in a future PR.

);

const command = await getDockerRunCommand();

console.log(`Check the output file "${outFileName}" for test-proxy logs.`);

spawn(command, [], {
shell: true,
stdio: ["ignore", out, err]
});

// If you want it to be detached, add the following option and call unref()
// // detached: true,
// subprocess.unref();
}

function getRootLocation() {
let currentPath = process.cwd(); // Gives the current working directory
if (fs.existsSync(path.join(currentPath, "package.json"))) {
// <root>/sdk/service/project/package.json
const expectedRootPath = path.join(currentPath, "..", "..", ".."); // <root>/
if (
fs.existsSync(path.join(expectedRootPath, "sdk/")) && // <root>/sdk
fs.existsSync(path.join(expectedRootPath, "rush.json")) // <root>/rush.json
) {
// reached root path
return expectedRootPath;
} else {
throw new Error("rootPath could not be calculated properly from process.cwd()");
}
} else {
throw new Error(`Expected 'package.json' to be found at ${currentPath}`);
}
}
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved

async function getDockerRunCommand() {
const repoRoot = getRootLocation(); // /workspaces/azure-sdk-for-js/
const testProxyRecordingsLocation = "/etc/testproxy";
Copy link
Member

Choose a reason for hiding this comment

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

nit: /etc is usually for system configurations. maybe use another directory?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Azure/azure-sdk-tools#2279

@HarshaNalluru the PR is submitted to sync the proxy tool tag update, I will need to change this script as well. That will keep everything in sync.

const allowLocalhostAccess = "--add-host host.docker.internal:host-gateway";
const imageToLoad = `azsdkengsys.azurecr.io/engsys/testproxy-lin:${await getImageTag()}`;
return `docker run -v ${repoRoot}:${testProxyRecordingsLocation} -p 5001:5001 -p 5000:5000 ${allowLocalhostAccess} ${imageToLoad}`;
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these ports be parametrized?

Copy link
Member Author

Choose a reason for hiding this comment

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

Logged an issue for this at #15829, will tackle in a future PR.

}

export async function isProxyToolActive() {
await makeRequest("http://localhost:5000/info/available", {});
console.log(`Proxy tool seems to be active at http://localhost:5000\n`);
}

async function makeRequest(uri: string, requestOptions: RequestOptions): Promise<IncomingMessage> {
return new Promise<IncomingMessage>((resolve, reject) => {
let req = request(uri, requestOptions, resolve);
req.once("error", reject);
req.end();
});
}

async function getImageTag() {
// Grab the tag from the `/eng/common/testproxy/docker-start-proxy.ps1` file [..is used to run the proxy-tool in the CI]
//
// $SELECTED_IMAGE_TAG = "1147815";
// (Bot regularly updates the tag in the file above.)
try {
const contentInPWSHScript = await fs.promises.readFile(
`${path.join(getRootLocation(), "eng/common/testproxy/docker-start-proxy.ps1")}`,
"utf-8"
);
const tag = contentInPWSHScript.match(/\$SELECTED_IMAGE_TAG \= \"(.*)\"/)![1];
console.log(`Image tag obtained from the powershell script => ${tag}\n`);
return tag;
} catch (_) {
console.log(
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
`Unable to get the image tag from the powershell script, trying "latest" tag instead\n`
);
return "latest";
}
}
2 changes: 1 addition & 1 deletion eng/tools/rush-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const getServicePackages = (baseDir, serviceDirs) => {
const packageJsons = getPackageJsons(searchDir);
for (const filePath of packageJsons) {
const contents = JSON.parse(fs.readFileSync(filePath, "utf8"));
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
if (contents["sdk-type"] === "client" || contents["sdk-type"] === "mgmt" || contents["sdk-type"] === "perf-test") {
if (contents["sdk-type"] === "client" || contents["sdk-type"] === "mgmt" || contents["sdk-type"] === "perf-test" || contents["sdk-type"] === "utility") {
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
packageNames.push(contents.name);
packageDirs.push(path.dirname(filePath));
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/test-utils/perf/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure/test-utils-perf",
"version": "1.0.0",
"sdk-type": "client",
"sdk-type": "utility",
Copy link
Member

Choose a reason for hiding this comment

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

Definitely like the idea of using sdk-type for more things. 👍

"description": "Performance and stress test framework for the Azure SDK for JavaScript and TypeScript",
"main": "dist-esm/src/index.js",
"module": "dist-esm/src/index.js",
Expand Down
9 changes: 5 additions & 4 deletions sdk/test-utils/recorder-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@
"extract-api": "echo skipped",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test:node": "concurrently \"npm run tests:server\" \"npm run test:node-with-proxy\" --kill-others --success first",
"test:node-with-proxy": "dev-tool test:node --mocha-options \"--timeout 1200000 'test/*.spec.ts'\"",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"tests:server": "cross-env TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\": \\\"commonjs\\\"}\" ts-node test/utils/server.ts",
"temp-integration-test:browser": "concurrently \"npm run tests:server\" \"karma start --single-run\" --kill-others --success first",
"temp-integration-test:node": "concurrently \"npm run tests:server\" \"nyc mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace 'test/*.spec.ts'\" --kill-others --success first",
"lint:fix": "eslint package.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json src test --ext .ts -f html -o recorder-lintReport.html || exit 0",
"pack": "npm pack 2>&1",
"unit-test:browser": "echo skipped",
"unit-test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"test:browser": "npm run clean && npm run build && npm run temp-integration-test:browser",
"test:node": "npm run clean && npm run build:test && npm run temp-integration-test:node",
"test:node": "npm run clean && npm run build:test && npm run integration-test:node",
"test": "npm run clean && npm run build:test && npm run unit-test",
"docs": "echo Skipped."
"docs": "echo Skipped.",
"dev-tool": "dev-tool"
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion sdk/test-utils/recorder/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure-tools/test-recorder",
"version": "1.0.2",
"sdk-type": "client",
"sdk-type": "utility",
"description": "This library provides interfaces and helper methods to provide recording and playback capabilities for the tests in Azure JS/TS SDKs",
"main": "dist/index.js",
"module": "dist-esm/src/index.js",
Expand Down
1 change: 1 addition & 0 deletions sdk/test-utils/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "Test utilities library for the Azure SDK for JavaScript and TypeScript",
"main": "dist/index.js",
"sdk-type": "utility",
"module": "dist-esm/src/index.js",
"browser": {
"./dist-esm/src/global.js": "./dist-esm/src/global.browser.js"
Expand Down
1 change: 1 addition & 0 deletions sdk/test-utils/testing-recorder-new/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ You will need to create a local `.env` file under the same directory as this rea
"STORAGE_CONNECTION_STRING",
"STORAGE_SAS_URL",
"TABLES_SAS_CONNECTION_STRING"
```
5 changes: 3 additions & 2 deletions sdk/test-utils/testing-recorder-new/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure-tools/testing-recorder-new",
"version": "1.0.0",
"sdk-type": "test",
"sdk-type": "client",
"description": "This library uses the interfaces and helper methods from @azure-tools/test-recorder-new in the tests to show an example",
"main": "dist/index.js",
"module": "dist-esm/src/index.js",
Expand All @@ -18,7 +18,8 @@
"extract-api": "echo skipped",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "karma start --single-run",
"integration-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"test/*.spec.ts\"",
"integration-test:node": "dev-tool test:node --mocha-options \"--timeout 1200000 'test/*.spec.ts'\"",
"backup-integration-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"test/*.spec.ts\"",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json src test --ext .ts -f html -o recorder-lintReport.html || exit 0",
Expand Down