I'd like to rework how we do backup testing to better accommodate future changes. Primarily, this would mean creating a set of basic, abstract, tests and then creating variations of them for local backups, S3, Minio, and any future backup endpoints. This would significantly reduce code duplication and would mean we could quickly and easily test new features or endpoints making use of existing testcases.
This would mean:
Creating an abstract "setup" function for backup, that takes a parameter (enum?) for the type of backup.
This setup function then provisions the necessary infra; s3 buckets, minio pods, etc.
The test can then continue as normal regardless of the variation of the test, because all of the platform-specific stuff takes place in the setup function.
The setup returns a cleanup function that we can defer to clean everything up
This would mean we can have a single "TestBackupAndRestore" test, and invoke it multiple times for S3, Minio, etc. - much better test coverage and much less duplication!
We currently do something similar to this for S3, so abstracting this further seems intuitive.