Page MenuHomeSoftware Heritage

test_storage: introduce a db_transaction context manager
ClosedPublic

Authored by olasd on Wed, Oct 2, 5:24 PM.

Details

Summary

This wraps the steps needed to get a (properly wrapped) db object and run a
transaction on it so we avoid repeating ourselves

Depends on D2066

Test Plan

no functional changes either

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.