test: add script for updating the mock cdn files and headers automatically to the latest version#23706
test: add script for updating the mock cdn files and headers automatically to the latest version#23706
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| return { | ||
| mainnetConfigVersion, | ||
| mainnetStaleVersion, | ||
| mainnetStaleDiffVersion, |
There was a problem hiding this comment.
we need to get each file version, for later make the corresponding request to the config, stale and stale_files, by passing the version into the URL param
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #23706 +/- ##
========================================
Coverage 68.81% 68.81%
========================================
Files 1169 1169
Lines 44376 44376
Branches 11874 11874
========================================
Hits 30536 30536
Misses 13840 13840 ☔ View full report in Codecov by Sentry. |
| "download-builds:test": "tsx .devcontainer/download-builds.ts prep-build-test", | ||
| "master-sync": "node development/master-sync.js" | ||
| "master-sync": "node development/master-sync.js", | ||
| "update-mock-cdn": "node test/e2e/mock-cdn/update-mock-cdn-files.js" |
There was a problem hiding this comment.
Hey @seaona : is this script also called somewhere ?
There was a problem hiding this comment.
hey Jyoti, the script is not called anywhere in the code for now. We can use run it locally whenever we want to update/get new files, instead of doing this manually. For example, for adding this new spec, where we test a data upgrade
#23641
In the future we could think on having some periodic upgrades of the mock files in the case we want, and we could use this script too.
Description
After the cdn mock PR has been merged, we are now introducing a script for automatically replace the mocks with the latest version files.
This way, when running
yarn mock-cdn-updatethe new versions will be fetched and all the mocks regarding cdn blockaid will be updated.Related issues
Fixes: #23640
Manual testing steps
yarn mock-cdn-update--> see cdn files are updatedyarn test:e2e:single test/e2e/tests/ppom/ppom-blockaid-alert-simple-send.spec.js --browser=chrome--> see they continue to pass using the new cdn filesScreenshots/Recordings
update-mock-cdn-script.mp4
Pre-merge author checklist
Pre-merge reviewer checklist