Skip to content

Commit

Permalink
msal-node e2e tests: cert_path -> certificate_path (#7357)
Browse files Browse the repository at this point in the history
@azure/identity's `new DefaultAzureCredential()` expects
`AZURE_CLIENT_CERTIFICATE_PATH` instead of `AZURE_CLIENT_CERT_PATH`.

[Corresponding 1-P
PR](https://identitydivision.visualstudio.com/IDDP/_git/msal-javascript-1p/pullrequest/14791)
  • Loading branch information
Robbie-Microsoft authored Oct 4, 2024
1 parent ed4e1f3 commit f85b567
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion gen_env.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Variables
# To be used with @azure/identity functionality, they must adhere to the same names as described in:
# https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet
$dotEnvFileName = ".env"
$tenantIdInfo = 'AZURE_TENANT_ID="72f988bf-86f1-41af-91ab-2d7cd011db47"'
$clientIdName = "AZURE_CLIENT_ID="
$clientCertPathName = "AZURE_CLIENT_CERT_PATH="
$clientCertPathName = "AZURE_CLIENT_CERTIFICATE_PATH="
$sessionSecretName = "SESSION_SECRET="

# Create file if it doesn't exist
Expand Down
2 changes: 1 addition & 1 deletion samples/e2eTestUtils/src/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const ENV_VARIABLES = {
TENANT: "AZURE_TENANT_ID",
CLIENT_ID: "AZURE_CLIENT_ID",
CERT_PATH: "AZURE_CLIENT_CERT_PATH",
CERTIFICATE_PATH: "AZURE_CLIENT_CERTIFICATE_PATH",
};

export const LAB_API_ENDPOINT = "https://msidlab.com/api";
Expand Down
2 changes: 1 addition & 1 deletion samples/e2eTestUtils/src/LabClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class LabClient {
constructor() {
const tenant = process.env[ENV_VARIABLES.TENANT];
const clientId = process.env[ENV_VARIABLES.CLIENT_ID];
const client_cert_path = process.env[ENV_VARIABLES.CERT_PATH];
const client_cert_path = process.env[ENV_VARIABLES.CERTIFICATE_PATH];
this.currentToken = null;
if (!tenant || !clientId || !client_cert_path) {
throw "Environment variables not set!";
Expand Down

0 comments on commit f85b567

Please sign in to comment.