mirror of
https://github.com/kopia/kopia.git
synced 2026-03-03 05:47:24 -05:00
* versioned map mock storage * Update internal/blobtesting/versionedmap.go Co-authored-by: Julio Lopez <julio+gh@kasten.io> * versionedMapStorage -> objectLockingMap * move out write checks in a dedicated method Co-authored-by: Shikhar Mall <shikhar@kasten.io> Co-authored-by: Julio Lopez <julio+gh@kasten.io>
24 lines
456 B
Go
24 lines
456 B
Go
package blobtesting
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/minio/minio-go/v7"
|
|
|
|
"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: minio.Governance.String(),
|
|
RetentionPeriod: 24 * time.Hour,
|
|
})
|
|
}
|