Skip to content

Commit

Permalink
fix: switches user id to an env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Jun 12, 2024
1 parent c18144f commit 0d7d1a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
TENANT_ID: ${{secrets.tenant_id}}
CLIENT_ID: ${{secrets.client_id}}
CLIENT_SECRET: ${{secrets.client_secret}}
USER_ID: ${{secrets.user_id}}

# The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
Expand Down
6 changes: 5 additions & 1 deletion packages/msgraph-sdk-tests/userTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ describe("TestGet", () => {
});

it("should return messages for given user", async () => {
const userId = process.env.USER_ID;
if (!userId) {
throw Error("Missing USER_ID environment variable");
}
const messages = await graphServiceClient.users
.byUserId("a4bf4e43-981f-430c-8024-cdb645f8c098")
.byUserId(userId)
.messages.get();
assert.isDefined(messages?.value);
});
Expand Down

0 comments on commit 0d7d1a7

Please sign in to comment.