Week 9 Review

TedLawson
Published: 08/01/2023

Accomplishments:

This week, I finished up the Borg test suite changes and got 3 PR's merged into Borg master. They are as follows:

PR: `testsuite/platform.py` conversion to pytest + remove `BaseTestCase` - https://github.com/borgbackup/borg/pull/7743 - This is one of the last remaining files in the test suite to have quite a bit of unittest and BaseTestCase usages, so I split it into its own PR. Here I converted all unittest to pytest, removed BaseTestCase entirely, and renamed some tests to follow the naming conventions of the classes they are being pulled from. Additionally, I split the `platform.py` test file into three subfiles: `platform_darwin`, `platform_linux`, and `platform_posix`. The original `platform` test file is now used to host tests that run on all platforms, and carries a collection of common pytest.mark.skip definitions that can be used by the other platforms. 

PR: `platform_freebsd.py` dummy test file - https://github.com/borgbackup/borg/pull/7748 - Created a dummy file for ACL testing FreeBSD. Relates to issue #7745. - Created at the request of one of my mentors, Thomas, who recommended starting a dummy file with tests that are skipped due to not being implemented yet. These tests will be implemented at a future date.

PR: Remove BaseTestCase from `testsuite/` - https://github.com/borgbackup/borg/pull/7742 - Now that the `ArchiverBaseTestCase` has been removed from `testsuite/archiver/__init__.py`, I now removed `BaseTestCase` from the `testsuite/__init__.py`. After @ThomasWaldmann's recent update to the `BaseTestCase`[here](https://github.com/borgbackup/borg/pull/7736), all that remained were a few assert methods that seem superfluous and could be replaced with the built-in python asserts. - This PR removed all remaining unittest and BaseTestCase from the testsuite folder, outside of the Borg selftest which relies on unittest.

Challenges:

This week I did not hit many roadblock - I am comfortable with the Borg testsutie at this point that I made most of these changes quickly and without too much assistance needed to get them merged quickly. As I move on to Vorta's test suite I imagine this background will come in very handy.

The week ahead:

I've talked about moving into Vorta's test suite a lot over the last few weeks, and then there was always something else that needed to be done with Borg! I can say with a lot of confidence that Borg's test suite is where we set out for it to be and I am proud of the work that has been accomplished there, with the massive amount of help from Thomas and the other contributors along the way. It feels good to have everything merged in and the test suite in a. really good place now. I have begin writing tests for the VOrta test suite and keeping them locally on my machine until the integration tests PR that is being worked on by Jetchirag is merged into master. So far I have completed some utils tests and plan to work on Scheduler and Notifications next, as there is some quick gains to be made here. 

DJDT

Versions

Time

Settings from gsoc.settings

Headers

Request

SQL queries from 1 connection

Static files (2312 found, 3 used)

Templates (11 rendered)

Cache calls from 1 backend

Signals

Log messages