Using `requre` in our intergration tests
Seeing requre in action, I think it would a very good asset for our test suite to guarantee we are using some realistic requests. It basically does one real request and records the output so that next time it tries to do the same request (in the test-suite for example) it redirects it to the recorded data instead. @vaibhavdaren @AthreyVinay would you be interested in researching that and would you have the cycles for it?
It seems we can also use it for cli commands and its from packit folks, so we can get some feedback from @lachmanfrantisek on the state and usefulness of that project
Let's investigate! See the third point, check for possible alternatives too.
Possible issues:
-
requrestores possibly a lot of data, Polarion tests are kept in a separate repository; - effectively new tool for us, might require some time to get to know how to use it effectively when API changes;
- Packit actually considers moving away because of the lack of maintenance but found no real alternative.
As far as I know requre is the only solution that can record any call. Here are the http-only alternatives:
- https://vcrpy.readthedocs.io/en/latest/
- https://betamax.readthedocs.io/en/latest/
Downside of requre is it's code complexity making it hard to maintain. Also, I don't know about any big user than Packit itself. (But Packit and OGR library uses that a lot.)
Let me know if you need any help -- I've spent some with requre code working on all the (hopefully handy..;) user-facing decorators...