nspcc-dev/s3-tests

Extend pytest flags

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.

There is some strange behaviour of s3-gate tests. If we start tests from the beginning and with a fresh env as

pytest --disable-warnings -m 'not fails_on_aws and not fails_on_dbstore' -v s3tests_boto3/functional/test_s3.py s3tests_boto3/functional/test_s3_neofs.py

some tests are failing and the reproduction of this is almost 100%.

If we try to store env, the situation is the same

pytest --persist-env --disable-warnings -m 'not fails_on_aws and not fails_on_dbstore' -v s3tests_boto3/functional/test_s3.py s3tests_boto3/functional/test_s3_neofs.py

But, if we try to reuse this env and kill s3-gate, then run it with the same command, but from the terminal, most of the failed tests from previous steps are going to be green. And this behaviour stays unchangeable - I mean almost all tests are green.

$ ps aux | grep neofs-s3-
user+   72155  0.3  0.3 874160 56472 pts/2    Sl   08:18   0:00 ./neofs-s3-gw --config env_files/neofs-env-2024-06-19-08-16-51/s3gw_config_wifdolhbod.yml
$ kill 72155

# manual start of the gate
$ ./neofs-s3-gw --config env_files/neofs-env-2024-06-19-08-16-51/s3gw_config_wifdolhbod.yml

Describe the solution you'd like

There may be some env vars which may affect manual gate starts. I would have a pytest flag as --show-env-vars to see all env vars that pytest set up for persistent env and try to reproduce env. May be some grouping for service to convenient reading, but this is an optional request.

Describe alternatives you've considered

I don't even know what to do, because debugging version of the gate works as a manual start and many tests persistently green

The original issue wasn't related to different env variables. The fix for the issue is here - nspcc-dev/neofs-testcases#820.
Tests do not propagate any additional env vars than to spawned processes. So new flag to print them would be useless.