From b9ea2f35552d50331af54680a3aa72a12b9ea720 Mon Sep 17 00:00:00 2001 From: HarshaNalluru <10452642+HarshaNalluru@users.noreply.github.com> Date: Mon, 26 Aug 2019 13:19:23 -0700 Subject: [PATCH] testing skip --- .../keyvault-secrets/tests/CRUD.test.ts | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/sdk/keyvault/keyvault-secrets/tests/CRUD.test.ts b/sdk/keyvault/keyvault-secrets/tests/CRUD.test.ts index 38b53e5f8d58..292719d17f13 100644 --- a/sdk/keyvault/keyvault-secrets/tests/CRUD.test.ts +++ b/sdk/keyvault/keyvault-secrets/tests/CRUD.test.ts @@ -4,11 +4,10 @@ import * as assert from "assert"; import { SecretsClient } from "../src"; import { retry } from "./utils/recorder"; -import { env } from "@azure/test-utils-recorder"; +import { env, Recorder } from "@azure/test-utils-recorder"; import { authenticate } from "./utils/testAuthentication"; import TestClient from "./utils/testClient"; import { AbortController } from "@azure/abort-controller"; -import { isNode } from "@azure/core-http"; describe("Secret client - create, read, update and delete operations", () => { const secretValue = "SECRET_VALUE"; @@ -16,7 +15,7 @@ describe("Secret client - create, read, update and delete operations", () => { let secretSuffix: string; let client: SecretsClient; let testClient: TestClient; - let recorder: any; + let recorder: Recorder; beforeEach(async function() { const authentication = await authenticate(this); @@ -42,28 +41,27 @@ describe("Secret client - create, read, update and delete operations", () => { await testClient.flushSecret(secretName); }); - if (!isNode && (env.TEST_MODE === "record" || env.TEST_MODE === "playback")) { - } else { - it("can abort adding a secret", async function() { - const secretName = testClient.formatName( - `${secretPrefix}-${this!.test!.title}-${secretSuffix}` - ); - const controller = new AbortController(); - const resultPromise = client.setSecret(secretName, secretValue, { - requestOptions: { - abortSignal: controller.signal - } - }); - controller.abort(); - let error; - try { - await resultPromise; - } catch (e) { - error = e; + it("can abort adding a secret", async function() { + // recorder.skip("browser"); + recorder.skip(); + const secretName = testClient.formatName( + `${secretPrefix}-${this!.test!.title}-${secretSuffix}` + ); + const controller = new AbortController(); + const resultPromise = client.setSecret(secretName, secretValue, { + requestOptions: { + abortSignal: controller.signal } - assert.equal(error.message, "The request was aborted"); }); - } + controller.abort(); + let error; + try { + await resultPromise; + } catch (e) { + error = e; + } + assert.equal(error.message, "The request was aborted"); + }); it("cannot create a secret with an empty name", async function() { const secretName = "";