Skip to content

Prepare tests for plugging in transactions

Sami Hiltunen requested to merge smh-tx-mw-test-preparation into master

Various tests would currently fail when we plug in transactions. They're failing due due to problems in the test setup:

  1. TransactionService is being configured in Gitaly in the tests where as it would actually run in Praefect. This won't soon work as the TransactionService RPCs do not have annotations, and adding annotation isn't really necessary. Fix this by setting up transaction service in a separate gRPC server, not the Gitaly one.
  2. Some tests are asserting the path of repositories. They're subject to change, and will change with when transactions start rewriting requests to point to the snapshot repositories. Fix the tests not to assert the path of a repository.
  3. Our CreateRepository helper is removing the repositories created through it at the end of the test. This may not work with tests that are setting up the repository with invalid state as that could prevent starting a transaction. Change the helper from failing the test to logging the failure.

Merge request reports