Field labels for Duration, Time, client.ObjectKey, KibishiiData, VeleroCLI2Version

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
This commit is contained in:
Tiger Kaovilai
2023-04-16 12:34:28 -04:00
parent 65f99c1264
commit da0f5d5850
7 changed files with 68 additions and 68 deletions

View File

@@ -725,7 +725,7 @@ func TestProcessBackupCompletions(t *testing.T) {
Phase: velerov1api.BackupPhaseFinalizing,
Version: 1,
FormatVersion: "1.1.0",
Expiration: &metav1.Time{now.Add(10 * time.Minute)},
Expiration: &metav1.Time{Time: now.Add(10 * time.Minute)},
StartTimestamp: &timestamp,
},
},

View File

@@ -54,7 +54,7 @@ func mockBackupRepositoryCR() *velerov1api.BackupRepository {
Name: "repo",
},
Spec: velerov1api.BackupRepositorySpec{
MaintenanceFrequency: metav1.Duration{testMaintenanceFrequency},
MaintenanceFrequency: metav1.Duration{Duration: testMaintenanceFrequency},
},
}
@@ -153,7 +153,7 @@ func TestBackupRepoReconcile(t *testing.T) {
Name: "unknown",
},
Spec: velerov1api.BackupRepositorySpec{
MaintenanceFrequency: metav1.Duration{testMaintenanceFrequency},
MaintenanceFrequency: metav1.Duration{Duration: testMaintenanceFrequency},
},
},
expectNil: true,
@@ -166,7 +166,7 @@ func TestBackupRepoReconcile(t *testing.T) {
Name: "repo",
},
Spec: velerov1api.BackupRepositorySpec{
MaintenanceFrequency: metav1.Duration{testMaintenanceFrequency},
MaintenanceFrequency: metav1.Duration{Duration: testMaintenanceFrequency},
},
},
expectNil: true,
@@ -179,7 +179,7 @@ func TestBackupRepoReconcile(t *testing.T) {
Name: "repo",
},
Spec: velerov1api.BackupRepositorySpec{
MaintenanceFrequency: metav1.Duration{testMaintenanceFrequency},
MaintenanceFrequency: metav1.Duration{Duration: testMaintenanceFrequency},
},
Status: velerov1api.BackupRepositoryStatus{
Phase: velerov1api.BackupRepositoryPhaseNew,

View File

@@ -247,7 +247,7 @@ func (m *manager) getRepositoryProvider(repo *velerov1api.BackupRepository) (pro
func (m *manager) assembleRepoParam(repo *velerov1api.BackupRepository) (provider.RepoParam, error) {
bsl := &velerov1api.BackupStorageLocation{}
if err := m.client.Get(context.Background(), client.ObjectKey{m.namespace, repo.Spec.BackupStorageLocation}, bsl); err != nil {
if err := m.client.Get(context.Background(), client.ObjectKey{Namespace: m.namespace, Name: repo.Spec.BackupStorageLocation}, bsl); err != nil {
return provider.RepoParam{}, errors.WithStack(err)
}
return provider.RepoParam{