4

Use the existing GPG fixture in the functional tests (CryptoUtil 2/3) by nabla-c...

 2 years ago
source link: https://github.com/freedomofpress/securedrop/pull/6184
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Contributor

@nabla-c0d3 nabla-c0d3 commented on Nov 22, 2021

edited

Status

Ready.

Description of Changes

This PR updates the functional tests to use the same fixture for GPG as the other tests. It also updates the config fixture.

  • This is a prerequisite for the refactoring of the GPG code in #6160 which uses the updated config fixture.
  • This is a small step forward for #3836. More work is needed to refactor the functional tests and their fixtures.
  • Because the GPG fixture that is now being used is session-scoped, it is only called once during the whole test suite, and only one GPG home directory is used for all the tests. This helps a little bit with #4332 (only 1 GPG process should get created instead of ~80).
  • There is more work to be done with the config fixture itself, and I might take a look at it eventually. The biggest problem is that tests might either use the config from the config() fixture, or the config from the config.py file generated by make test right before the tests run.
    • This creates really tricky interactions and bugs when working on the test suite, because it's unclear which config is being used. It's also sometime unclear what config is needed for a specific test to succeed, and some tests also tend to mutate the config object (for example changing the time it takes for a session to expire).
    • This PR makes small changes to slightly improve this situation.
All reactions

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK