vip-cli
vip-cli copied to clipboard
Add/media import improvements
Description
This PR uses the failure details URL for the import media command.
Pull request checklist
- [ ] Update SETUP.md with any new environmental variables.
- [ ] Update the documentation.
- [ ] Manually test the relevant changes.
- [ ] Follow the pull request checklist
- [ ] Add/update automated tests as needed.
New release checklist
- [ ] Automated tests pass.
- [ ] The Preparing for release checklist is completed.
Changelog Description
Media import: Add option to download failure details logs from URL returned in the media import request response body.
Steps to Test
Obs.: This test requires a locall VIP API public up and running.
- Check out PR.
- Run
npm run build
Scenario 1:
- Import media files by running
VIP_PROXY="" API_HOST={ LOCAL_VIP_API_PUBLIC_URL } node ./dist/bin/vip-import-media.js @{ TEST_SITE_ID }.{ ENV_SITE } { MEDIA_TO_BE_IMPORTED_URL }
The output should contain a message about the errors and a prompt as:
⚠️ Error details can be found on ${ ERROR_DETAILS_URL_RETURNED_BY_VIP_PUBLIC_API }
Download error details now? (y/N) ›
- Answer y
- The output should contain information about the download and the local file as a result:
⚠️ All errors have been exported to { LOCAL_PATH }
Scenario 2:
Repeat step 1
- Answer n
- The prompt should exit