Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
322288a
move as recorder 2.0
Jan 6, 2022
826e725
Merge branch 'main' of https://github.com/azure/azure-sdk-for-js into…
Jan 6, 2022
a8a5d53
lock file
Jan 6, 2022
2f9608a
link fix
Jan 6, 2022
a33449f
karma fix
Jan 7, 2022
dfc5809
Merge branch 'main' of https://github.com/azure/azure-sdk-for-js into…
Jan 7, 2022
31615bc
lock file
Jan 7, 2022
5eb4787
formatting and lint
Jan 7, 2022
ace3a6d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Jan 12, 2022
44e7301
Update sdk/test-utils/recorder/package.json
HarshaNalluru Jan 12, 2022
f2804dc
Update sdk/test-utils/recorder/tsconfig.json
HarshaNalluru Jan 12, 2022
e44422a
feedback and merges
HarshaNalluru Jan 12, 2022
c700337
Merge branch 'harshan/recorder-v2' of https://github.com/harsha-nallu…
HarshaNalluru Jan 12, 2022
3a5f2d0
lock file
HarshaNalluru Jan 12, 2022
26ad244
lock file
HarshaNalluru Jan 12, 2022
3130ece
clean karma
HarshaNalluru Jan 13, 2022
e32803e
fix package.json
HarshaNalluru Jan 13, 2022
bff7730
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Jan 13, 2022
717f480
lock file
HarshaNalluru Jan 13, 2022
dc91ff3
formatting
HarshaNalluru Jan 13, 2022
3968440
temp commit - tag and version updates
HarshaNalluru Jan 13, 2022
9a50d95
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Jan 13, 2022
e1b0192
lock file
HarshaNalluru Jan 13, 2022
3842803
Revert "temp commit - tag and version updates"
HarshaNalluru Jan 13, 2022
434e2fb
new tags
HarshaNalluru Jan 13, 2022
5e72af8
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Jan 13, 2022
0a36017
test server
HarshaNalluru Jan 14, 2022
4754c87
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Jan 14, 2022
a5f8a7b
lock file
HarshaNalluru Jan 14, 2022
7967440
latest tables and updated recordings
HarshaNalluru Jan 14, 2022
5afbf49
build failure
HarshaNalluru Jan 14, 2022
134edef
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-js into…
HarshaNalluru Jan 14, 2022
2630bcb
lock file
HarshaNalluru Jan 14, 2022
d0e3653
formatting
HarshaNalluru Jan 14, 2022
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
684 changes: 477 additions & 207 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,11 +716,6 @@
"projectFolder": "sdk/test-utils/recorder",
"versionPolicyName": "utility"
},
{
"packageName": "@azure-tools/test-recorder-new",
"projectFolder": "sdk/test-utils/recorder-new",
"versionPolicyName": "utility"
},
{
"packageName": "@azure-tools/test-credential",
"projectFolder": "sdk/test-utils/test-credential",
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The environment variable **TEST_MODE** controls how the tests are running.
- Else If TEST_MODE = "playback" (or if the TEST_MODE is not set or set to an invalid value),
- Existing recordings are played back as responses to the HTTP requests in the tests

Please refer to the [guidelines on Record and Playback](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/recorder/GUIDELINES.md) for more details.
Please refer to the [guidelines on Record and Playback](https://github.com/Azure/azure-sdk-for-js/blob/c06170fbaf39e81496f8009a0da93d470d8c9f88/sdk/test-utils/recorder/GUIDELINES.md) for more details.
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to use a constant commit here?

Copy link
Contributor

@HarshaNalluru HarshaNalluru Jan 12, 2022

Choose a reason for hiding this comment

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

Thanks for the comment @EmmaZhu.
We are coming up with a new recorder based on the proxy tool built by the ENG SYS team.
Eventually, we'll be migrating all the services(tests) to use the new recorder.

Here's the migration guide - #19210

The guides are different for the old and new recorders.
Since storage is still on the old recorder, I'm pointing it to the docs that are relevant to the old recorder for storage.
Once storage packages are migrated to use the new proxy-tool based recorder, we'll update these links too.


### Emulator Tests

Expand Down Expand Up @@ -156,7 +156,7 @@ npm run test

`npm run test` would run the the tests in both node and the browser.

**Link** - [Guidelines for record and playback - `@azure-tools/test-recorder`](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/test-utils/recorder/GUIDELINES.md)
**Link** - [Guidelines for record and playback - `@azure-tools/test-recorder`](https://github.com/Azure/azure-sdk-for-js/blob/c06170fbaf39e81496f8009a0da93d470d8c9f88/sdk/test-utils/recorder/GUIDELINES.md)

## Pull Requests

Expand Down
2 changes: 1 addition & 1 deletion sdk/tables/perf-tests/data-tables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@azure/data-tables": "^12.1.2",
"@azure/data-tables": "^13.0.2",
"@azure/test-utils-perf": "^1.0.0",
"dotenv": "^8.2.0",
"uuid": "^8.3.0"
Expand Down
23 changes: 3 additions & 20 deletions sdk/template/template/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@
// https://github.com/karma-runner/karma-chrome-launcher
process.env.CHROME_BIN = require("puppeteer").executablePath();
process.env.RECORDINGS_RELATIVE_PATH =
require("@azure-tools/test-recorder-new").relativeRecordingsPath();
require("@azure-tools/test-recorder").relativeRecordingsPath();
require("dotenv").config();
const {
jsonRecordingFilterFunction,
isPlaybackMode,
isSoftRecordMode,
isRecordMode,
} = require("@azure-tools/test-recorder");

module.exports = function (config) {
config.set({
Expand All @@ -32,15 +26,13 @@ module.exports = function (config) {
"karma-env-preprocessor",
"karma-coverage",
"karma-junit-reporter",
"karma-json-to-file-reporter",
"karma-json-preprocessor",
],

// list of files / patterns to load in the browser
files: [
"dist-test/index.browser.js",
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true },
].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []),
],

// list of files / patterns to exclude
exclude: [],
Expand All @@ -49,7 +41,6 @@ module.exports = function (config) {
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
"**/*.js": ["env"],
"recordings/browsers/**/*.json": ["json"],
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
// Preprocess source file to calculate code coverage, however this will make source file unreadable
//"dist-test/index.browser.js": ["coverage"]
Expand All @@ -69,7 +60,7 @@ module.exports = function (config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ["mocha", "coverage", "junit", "json-to-file"],
reporters: ["mocha", "coverage", "junit"],

coverageReporter: {
// specify a common output directory
Expand All @@ -87,11 +78,6 @@ module.exports = function (config) {
properties: {}, // key value pair of properties to add to the <properties> section of the report
},

jsonToFileReporter: {
filter: jsonRecordingFilterFunction,
outputPath: ".",
},

// web server port
port: 9876,

Expand Down Expand Up @@ -126,9 +112,6 @@ module.exports = function (config) {
browserNoActivityTimeout: 600000,
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 3,
browserConsoleLogOptions: {
terminal: !isRecordMode(),
},

client: {
mocha: {
Expand Down
3 changes: 1 addition & 2 deletions sdk/template/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@microsoft/api-extractor": "^7.18.11",
"@types/chai": "^4.1.6",
"@types/chai-as-promised": "^7.1.0",
Expand Down Expand Up @@ -122,7 +122,6 @@
"source-map-support": "^0.5.9",
"typescript": "~4.2.0",
"util": "^0.12.1",
"@azure-tools/test-recorder-new": "~1.0.0",
"@azure-tools/test-credential": "~1.0.0"
},
"//sampleConfiguration": {
Expand Down
11 changes: 4 additions & 7 deletions sdk/template/template/test/public/configurationClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@

import { assert } from "chai";
import { Context } from "mocha";

import { ConfigurationClient } from "../../src";

import { env } from "@azure-tools/test-recorder";
import { Recorder } from "@azure-tools/test-recorder-new";
import { Recorder, assertEnvironmentVariable } from "@azure-tools/test-recorder";
import { createTestCredential } from "@azure-tools/test-credential";

// When the recorder observes the values of these environment variables in any
Expand All @@ -25,7 +22,7 @@ const replaceableVariables: Record<string, string> = {
function createConfigurationClient(recorder: Recorder): ConfigurationClient {
// Retrieve the endpoint from the environment variable
// we saved to the .env file earlier
const endpoint = env.APPCONFIG_ENDPOINT;
const endpoint = assertEnvironmentVariable("APPCONFIG_ENDPOINT");

// We use the createTestCredential helper from the test-credential tools package.
// This function returns the special NoOpCredential in playback mode, which
Expand Down Expand Up @@ -73,8 +70,8 @@ describe("[AAD] ConfigurationClient functional tests", function () {
});

it("predetermined setting has expected value", async () => {
const key = env.APPCONFIG_TEST_SETTING_KEY;
const expectedValue = env.APPCONFIG_TEST_SETTING_EXPECTED_VALUE;
const key = assertEnvironmentVariable("APPCONFIG_TEST_SETTING_KEY");
const expectedValue = assertEnvironmentVariable("APPCONFIG_TEST_SETTING_EXPECTED_VALUE");

const setting = await client.getConfigurationSetting(key);

Expand Down
2 changes: 0 additions & 2 deletions sdk/test-utils/recorder-new/.gitignore

This file was deleted.

117 changes: 0 additions & 117 deletions sdk/test-utils/recorder-new/CHANGELOG.md

This file was deleted.

54 changes: 0 additions & 54 deletions sdk/test-utils/recorder-new/README.md

This file was deleted.

Loading