Skip to content
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

Scytl fix browser headers and requests lib w mock #762

Conversation

agreenspan24
Copy link
Contributor

@shaunagm

Three issues were occurring that caused the tests to fail:

  • First, the zip file request mocks weren't being set up correctly. This sets them as such.
  • Second, the outgoing requests using urllib.request tooling was not respecting the mocks, instead going directly to the Scytl server. We didn't notice because the urls and files that were mocked and saved were identical to the ones on the server.
  • Third, Scytl started enforcing logic to prevent requests that aren't coming from a browser, causing the 403 Forbidden errors. By adding a UserAgent header, Scytl will now think we are making a request from a browser.

Not sure why it didn't fail when we re-ran the tests last night in CircleCI, but this should be the fix.

@agreenspan24 agreenspan24 marked this pull request as ready for review October 21, 2022 12:47
Copy link
Collaborator

@SorenSpicknall SorenSpicknall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround on this!

@SorenSpicknall SorenSpicknall merged commit 98574cf into move-coop:main Oct 21, 2022
@agreenspan24 agreenspan24 deleted the scytl-fix-browser-headers-and-requests-lib-w-mock branch October 21, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants