Skip to content

Commit

Permalink
[KeyVault] dotenv fix (#4533)
Browse files Browse the repository at this point in the history
With this change, we can have a `.env` file in `sdk/keyvault` (the parent
folder, as well as with other of our projects using dotenv) with the
following properties:

```
AZURE_CLIENT_ID=XXXXXXXX
AZURE_CLIENT_SECRET=XXXXXXXX
AZURE_TENANT_ID=XXXXXXXX
KEYVAULT_NAME=XXXXXXXX
TEST_MODE=["record" or "playback", without quotes]
```

And then run `rushx integration-test:node` to record (or playback) all
the tests with the Node environment, and also `rushx integration-test:browser`
to run the tests with the browser environment.

Would this help with #4389 ?

Please review 💙
  • Loading branch information
sadasant authored Jul 30, 2019
1 parent fd1d601 commit 39a30e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-keys/tests/utils/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { retry as realRetry } from "./retry";
import { isNode as coreIsNode, delay as coreDelay } from "@azure/core-http";
import queryString from "query-string";
import * as dotenv from "dotenv";
dotenv.config({ path: "../../.env" });
dotenv.config({ path: "../.env" });

export function isBrowser(): boolean {
return typeof window !== "undefined";
Expand Down
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-secrets/tests/utils/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { retry as realRetry } from "./retry";
import { isNode as coreIsNode } from "@azure/core-http";
import queryString from "query-string";
import * as dotenv from "dotenv";
dotenv.config({ path: "../../.env" });
dotenv.config({ path: "../.env" });

export function isBrowser(): boolean {
return typeof window !== "undefined";
Expand Down

0 comments on commit 39a30e8

Please sign in to comment.