-
-
Notifications
You must be signed in to change notification settings - Fork 578
test: add integration tests for token storage #7500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add integration tests for token storage #7500
Conversation
COMPARE TO
|
Name | Diff |
---|---|
.github/workflows/alteration-compatibility-integration-test.yml | 📈 +157 Bytes |
.github/workflows/integration-test.yml | 📈 +157 Bytes |
packages/connectors/connector-mock-social/src/constant.ts | 📈 +33 Bytes |
packages/connectors/connector-mock-social/src/index.ts | 📈 +963 Bytes |
packages/integration-tests/src/api/admin-user.ts | 📈 +244 Bytes |
packages/integration-tests/src/api/connector.ts | 📈 +65 Bytes |
packages/integration-tests/src/helpers/experience/index.ts | 📈 +82 Bytes |
packages/integration-tests/src/tests/api/connector.test.ts | 📈 +85 Bytes |
packages/integration-tests/src/tests/api/experience-api/profile/social-fullfill-user-profiles.test.ts | 📈 +7.83 KB |
packages/integration-tests/src/tests/api/experience-api/sign-in-interaction/social.test.ts | 📈 +5.58 KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces token storage support in the social authentication flow by extending the mock connector, updating APIs and helpers, and enhancing integration tests and workflows.
- Extend mock-social-connector to return and validate token responses
- Update API and helper signatures to enable token storage and retrieve stored tokens
- Enhance integration tests and CI workflows to set up and verify token storage
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/connectors/connector-mock-social/src/index.ts | Add getTokenResponseAndUserInfo and session validation for token storage |
packages/connectors/connector-mock-social/src/constant.ts | Mark connector metadata with isTokenStorageSupported: true |
packages/integration-tests/src/api/connector.ts | Extend updateConnectorConfig to accept enableTokenStorage and syncProfile |
packages/integration-tests/src/api/admin-user.ts | Add getUserIdentityTokenSetRecord to fetch stored token sets |
packages/integration-tests/src/helpers/experience/index.ts | Extend signInWithSocial helper signature to include tokenResponse |
packages/integration-tests/src/tests/api/experience-api/sign-in-interaction/social.test.ts | Update social sign-in tests to enable and assert token storage |
packages/integration-tests/src/tests/api/experience-api/profile/social-fullfill-user-profiles.test.ts | Add dedicated tests for fulfilling missing user profiles |
packages/integration-tests/src/tests/api/connector.test.ts | Adapt connector config tests to the new updateConnectorConfig signature |
.github/workflows/integration-test.yml | Add SECRET_VAULT_KEK environment variable |
.github/workflows/alteration-compatibility-integration-test.yml | Add SECRET_VAULT_KEK environment variable |
Comments suppressed due to low confidence (1)
packages/connectors/connector-mock-social/src/index.ts:101
- Reference to randomUUID is used without importing it. Add
import { randomUUID } from 'crypto';
at the top of this file.
id: userId ?? `mock-social-sub-${randomUUID()}`,
packages/integration-tests/src/tests/api/experience-api/sign-in-interaction/social.test.ts
Outdated
Show resolved
Hide resolved
93ce80a
to
91f7970
Compare
7315824
to
025f1ed
Compare
packages/integration-tests/src/tests/api/experience-api/sign-in-interaction/social.test.ts
Show resolved
Hide resolved
add SECRET_VAULT_KEK env variable for integration test ci job
update mock social connector to support token storage
add integration test for token storage
clean up unused code
025f1ed
to
0ad8dc6
Compare
what does SECRET_VAULT_KEK stand for? |
add comments
key encryption key |
hardcode secret_vault_kek in the integration test ci job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on CI updates
.github/workflows/alteration-compatibility-integration-test.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Gao Sun <[email protected]>
Co-authored-by: Gao Sun <[email protected]>
Summary
This PR includes the following updates:
SECRET_VAULT_KEK
env variable.Testing
integration test
Checklist
.changeset