Repository navigation
Conversation
La feature AdminGithubUsers appelait la vraie API api.github.com sans authentification. Elle échouait en CI dès que la limite de 60 requêtes par heure et par IP était atteinte. En test, http_client.github est remplacé par une MockHttpClient qui renvoie les profils utilisés par les scénarios, et un 404 pour tout autre utilisateur.
Member
|
Jeudi dernier on avait un meetup AFUP Paris où Imen nous a parlé de sa PR symfony/symfony#63781 qui permet de record / replay des calls HTTP, je me dis que ça pourrait être vraiment une super solution pour le cas ici, on lance le test une fois en "réel" pour enregistrer les appels HTTP, puis dans la CI on réutilise ces calls record pour avoir des calls clean les plus proches possibles du réel ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
La feature AdminGithubUsers appelait la vraie API api.github.com sans authentification. Elle échouait en CI dès que la limite de 60 requêtes par heure et par IP était atteinte.
En test, http_client.github est remplacé par une MockHttpClient qui renvoie les profils utilisés par les scénarios, et un 404 pour tout autre utilisateur.