Page MenuHomeSoftware Heritage

test_storage: introduce a db_transaction context manager
ClosedPublic

Authored by olasd on Oct 2 2019, 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.