-
Notifications
You must be signed in to change notification settings - Fork 2
Offline Init Part 4 of 4: Add shared test data round-trip tests for offline initialization #119
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
base: aarsilv/ffesupport-461-offline-init-part3-offline-init
Are you sure you want to change the base?
Conversation
b1eab56 to
c6bb75d
Compare
ca3c73a to
94440d2
Compare
c6bb75d to
a769852
Compare
94440d2 to
1379067
Compare
a769852 to
b9221c2
Compare
1379067 to
af1b3d2
Compare
b9221c2 to
7cc0255
Compare
cd66e3e to
97f3542
Compare
7cc0255 to
0466712
Compare
97f3542 to
ea6a7ce
Compare
0466712 to
065c1b6
Compare
ea6a7ce to
71aac8b
Compare
065c1b6 to
3b021c2
Compare
71aac8b to
765ae90
Compare
Validates offline initialization using the shared UFC and bandit test data: - Initializes SDK via API, exports configuration - Resets module state and re-initializes using offlineInit - Runs all shared test cases against offline-initialized client This ensures exported configurations can be successfully used to bootstrap new SDK instances with identical behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes test isolation issue where tests ran after API server was closed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ests Move offlineInit describe block inside the main 'EppoClient E2E test' block so that round-trip tests have access to the mock API server started in beforeAll. Also fix indentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
765ae90 to
0f2cf90
Compare
| }, | ||
| ], | ||
| doLog: true, | ||
| describe('offlineInit', () => { |
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.
This is now pulled in to the parent E2E block so we can reuse the mock API server later on for offline init round-trip tests.
For some reason this really tripped up GitHub's diff
| }); | ||
| }); | ||
|
|
||
| describe('Shared UFC Test Cases via Offline Round-Trip', () => { |
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.
This is the meat of the change: using our shared test data to init normally, export the config, then offline init and run the shared test cases 💪
| ); | ||
| }); | ||
|
|
||
| describe('Shared Bandit Test Cases via Offline Round-Trip', () => { |
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.
And the bandit meat 💪
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 adds round-trip tests that validate the offline initialization workflow by exporting configurations from an online-initialized client and re-importing them via offlineInit(). The tests verify that offline-initialized clients produce identical assignment results to online-initialized clients using shared test cases from the sdk-test-data repository.
Changes:
- Removed an extra closing brace that was causing a structural error
- Added round-trip tests for UFC (Universal Feature Configuration) test cases
- Added round-trip tests for Bandit test cases
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
greghuels
left a comment
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.
Nice!
Summary
getFlagsConfiguration()andgetBanditsConfiguration()can be successfully imported viaofflineInit()sdk-test-datarepository (UFC and Bandit test suites) to ensure offline-initialized clients produce identical assignment results to online-initialized clientsStacked PRs
getFlagsConfiguration()getBanditsConfiguration()offlineInit()Test plan
🤖 Generated with Claude Code