Add append mode and logs to the http_client stub responses storage

Created on 24 October 2024, about 1 month ago

Problem/Motivation

After modifying tests, some stored responses can become outdated, and it's pretty hard to detect just by hashes which ones are not used in the new version of the tests.

So, the idea is to enable mode with writing logs when any stored request is read or written to a log file.

Then, a test wrapper script can read this file and clean up all obsolete stored responses, or maybe integrate something into the test_helpers directly.

Additionally, sometimes we add new requests to the tests and need to update the stored responses.

Now this is implemented with the mode "store" which overwrites each response to the fresh one.

But actually, in many cases, we want only to add missing responses, not regenerate the existing ones.

Especially, if the request leads to modifying something (eg create a new entity and returning the uuid) - on every "refresh" of stored responses it will generate the new uuid in the stored response.

And to fix this the idea is to introduce the "append" mode that will make actual requests only if the stored response is missing.

Feature request
Status

Active

Version

1.5

Component

Code

Created by

🇦🇲Armenia murz Yerevan, Armenia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024