mirror of
https://github.com/kopia/kopia.git
synced 2026-01-14 09:27:53 -05:00
* feat: persisting retention options in repository blob - plumb retention parameters through wrapped storage - generalize aes encryption mechanism - rewrite the retention blob on password change - do not write retention blob when empty * handle retention-blob not-found failures * cli params to set retention modes on repository create * enable versioned map mock storage with retention settings * adding unit tests * write format and retention blob with retention settings if available * rename certain functions and constants specific to format blob * delete retention cache on password-change * fix: replace SetTime() api call with TouchBlob() * Update repo/repository_test.go Co-authored-by: Nick <nick@kasten.io> * pr feedback and codecov improvements * fix: rename retention-blob structures to generic blob-cfg * fix: remove minio dependency on retention constants Co-authored-by: Shikhar Mall <shikhar@kasten.io> Co-authored-by: Nick <nick@kasten.io>
22 lines
413 B
Go
22 lines
413 B
Go
package blobtesting
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/kopia/kopia/internal/testlogging"
|
|
"github.com/kopia/kopia/repo/blob"
|
|
)
|
|
|
|
func TestObjectLockingStorage(t *testing.T) {
|
|
r := NewVersionedMapStorage(nil)
|
|
if r == nil {
|
|
t.Errorf("unexpected result: %v", r)
|
|
}
|
|
|
|
VerifyStorage(testlogging.Context(t), t, r, blob.PutOptions{
|
|
RetentionMode: blob.Governance,
|
|
RetentionPeriod: 24 * time.Hour,
|
|
})
|
|
}
|