7 Commits

Author SHA1 Message Date
ashmrtn
24b40cf601
Persist and enable kopia compression options (#577)
* Skip updating policy if no changes needed

* Set default compressor on repo connection and initialization

* Factor out common code for connecting to a repo

* New unit test ensuring compressor is set properly

Test compressor is set both through Initialize and Connect because
client code doesn't have to call Connect if it just did Initialize.
2022-08-16 23:19:57 +00:00
ashmrtn
9fc5cbb9d2
Allow configuring kopia compression (#544)
* Function that allows adjusting global compression

Takes the name of a kopia compressor and sets the default compressor to
be that in the repo.

* Basic unit tests for setting compression

Ensures that the policy is actually applied to future snapshots that
kopia will take.

* Integration test for changing compression types

Make sure that data is still available even if the global compression
policy changes from what it was when the backup was made.
2022-08-15 15:56:21 -07:00
Vaibhav Kamra
88bcd053e5
Simplify test utilities (#532) 2022-08-12 02:49:22 +00:00
ashmrtn
9e2e88f5f3
Enable some linters in revive (#486)
* Turn on revive linter, ignore only a few things

* Fix lint errors

Ignore shadowing of 'suite' in tests for now. Also move some constants
that had the same value to tester.
2022-08-04 14:42:51 -07:00
Keepers
d7fe518007
rename /internal/testing to /tester (#463)
The alias of testing to ctesting prevented auto-importing
of the testing library.  This change (arbitrarily) renames
the package so that it doesn't collide with the core pkg
for "testing".
2022-08-02 12:21:14 -06:00
Vaibhav Kamra
efe4319080
Fix for issues caught by go-lint (#327)
Error list visible [here](https://github.com/alcionai/corso/actions/runs/2653381666)
2022-07-12 11:19:32 -06:00
ashmrtn
70e7a1e2d3
Split KopiaWrapper into handle and backup/restore logic (#281)
* Split KopiaWrapper into repo handle and logic

With ModelStore, multiple structs need a reference to the kopia repo.
Make a small wrapper class (conn) that can open and initialize a repo. The
wrapper handles concurrent closes and opens and does ref counting to
ensure it only drops the kopia handle when the last reference is closed.

Rename KopiaWrapper to Wrapper and keep backup/restore functionality
in it.
2022-07-06 11:09:35 -07:00