mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 22:23:15 +00:00
bump kopia to v0.14 (#6833)
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -69,9 +69,9 @@ func SetupNewRepositoryOptions(ctx context.Context, flags map[string]string) rep
|
||||
func SetupConnectOptions(ctx context.Context, repoOptions udmrepo.RepoOptions) repo.ConnectOptions {
|
||||
return repo.ConnectOptions{
|
||||
CachingOptions: content.CachingOptions{
|
||||
MaxCacheSizeBytes: maxDataCacheMB << 20,
|
||||
MaxMetadataCacheSizeBytes: maxMetadataCacheMB << 20,
|
||||
MaxListCacheDuration: content.DurationSeconds(time.Duration(maxCacheDurationSecond) * time.Second),
|
||||
ContentCacheSizeBytes: maxDataCacheMB << 20,
|
||||
MetadataCacheSizeBytes: maxMetadataCacheMB << 20,
|
||||
MaxListCacheDuration: content.DurationSeconds(time.Duration(maxCacheDurationSecond) * time.Second),
|
||||
},
|
||||
ClientOptions: repo.ClientOptions{
|
||||
Hostname: optionalHaveString(udmrepo.GenOptionOwnerDomain, repoOptions.GeneralOptions),
|
||||
|
||||
@@ -111,9 +111,9 @@ func TestSetupNewRepositoryOptions(t *testing.T) {
|
||||
|
||||
func TestSetupConnectOptions(t *testing.T) {
|
||||
defaultCacheOption := content.CachingOptions{
|
||||
MaxCacheSizeBytes: 2000 << 20,
|
||||
MaxMetadataCacheSizeBytes: 2000 << 20,
|
||||
MaxListCacheDuration: content.DurationSeconds(time.Duration(30) * time.Second),
|
||||
ContentCacheSizeBytes: 2000 << 20,
|
||||
MetadataCacheSizeBytes: 2000 << 20,
|
||||
MaxListCacheDuration: content.DurationSeconds(time.Duration(30) * time.Second),
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.22.1. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
@@ -71,6 +71,20 @@ func (_m *Storage) DisplayName() string {
|
||||
return r0
|
||||
}
|
||||
|
||||
// ExtendBlobRetention provides a mock function with given fields: ctx, blobID, opts
|
||||
func (_m *Storage) ExtendBlobRetention(ctx context.Context, blobID blob.ID, opts blob.ExtendOptions) error {
|
||||
ret := _m.Called(ctx, blobID, opts)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, blob.ID, blob.ExtendOptions) error); ok {
|
||||
r0 = rf(ctx, blobID, opts)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// FlushCaches provides a mock function with given fields: ctx
|
||||
func (_m *Storage) FlushCaches(ctx context.Context) error {
|
||||
ret := _m.Called(ctx)
|
||||
@@ -104,13 +118,16 @@ func (_m *Storage) GetCapacity(ctx context.Context) (blob.Capacity, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
var r0 blob.Capacity
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context) (blob.Capacity, error)); ok {
|
||||
return rf(ctx)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context) blob.Capacity); ok {
|
||||
r0 = rf(ctx)
|
||||
} else {
|
||||
r0 = ret.Get(0).(blob.Capacity)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||
r1 = rf(ctx)
|
||||
} else {
|
||||
@@ -125,13 +142,16 @@ func (_m *Storage) GetMetadata(ctx context.Context, blobID blob.ID) (blob.Metada
|
||||
ret := _m.Called(ctx, blobID)
|
||||
|
||||
var r0 blob.Metadata
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, blob.ID) (blob.Metadata, error)); ok {
|
||||
return rf(ctx, blobID)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, blob.ID) blob.Metadata); ok {
|
||||
r0 = rf(ctx, blobID)
|
||||
} else {
|
||||
r0 = ret.Get(0).(blob.Metadata)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context, blob.ID) error); ok {
|
||||
r1 = rf(ctx, blobID)
|
||||
} else {
|
||||
@@ -141,6 +161,20 @@ func (_m *Storage) GetMetadata(ctx context.Context, blobID blob.ID) (blob.Metada
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// IsReadOnly provides a mock function with given fields:
|
||||
func (_m *Storage) IsReadOnly() bool {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func() bool); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// ListBlobs provides a mock function with given fields: ctx, blobIDPrefix, cb
|
||||
func (_m *Storage) ListBlobs(ctx context.Context, blobIDPrefix blob.ID, cb func(blob.Metadata) error) error {
|
||||
ret := _m.Called(ctx, blobIDPrefix, cb)
|
||||
|
||||
Reference in New Issue
Block a user