Skip to content

Commit

Permalink
chore: timestamp tests are driving me nuts
Browse files Browse the repository at this point in the history
  • Loading branch information
JGAntunes committed Dec 23, 2024
1 parent b4e81ee commit 74ecee5
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 225 deletions.
14 changes: 7 additions & 7 deletions pkg/kotsadmsnapshot/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func CreateInstanceBackup(ctx context.Context, cluster *downstreamtypes.Downstre
return "", errors.Wrap(err, "failed to create clientset")
}

ctrlClient, err := k8sutil.GetVeleroKubeClient(ctx)
ctrlClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return "", errors.Wrap(err, "failed to get kubeclient")
}
Expand Down Expand Up @@ -713,7 +713,7 @@ func ListBackupsForApp(ctx context.Context, kotsadmNamespace string, appID strin
return nil, errors.Wrap(err, "failed to create clientset")
}

veleroClient, err := k8sutil.GetVeleroKubeClient(ctx)
veleroClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to create velero client")
}
Expand Down Expand Up @@ -807,7 +807,7 @@ func ListInstanceBackups(ctx context.Context, kotsadmNamespace string) ([]*types
return nil, errors.Wrap(err, "failed to create clientset")
}

veleroClient, err := k8sutil.GetVeleroKubeClient(ctx)
veleroClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to create velero clientset")
}
Expand Down Expand Up @@ -937,7 +937,7 @@ func getAppsFromAppSequences(veleroBackup velerov1.Backup) ([]types.App, error)
}

func getSnapshotVolumeSummary(ctx context.Context, veleroBackup *velerov1.Backup) (*types.VolumeSummary, error) {
veleroClient, err := k8sutil.GetVeleroKubeClient(ctx)
veleroClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to create client")
}
Expand Down Expand Up @@ -984,7 +984,7 @@ func GetBackup(ctx context.Context, kotsadmNamespace string, backupID string) (*
return nil, errors.Wrap(err, "failed to create clientset")
}

veleroClient, err := k8sutil.GetVeleroKubeClient(ctx)
veleroClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to create velero clientset")
}
Expand Down Expand Up @@ -1031,7 +1031,7 @@ func DeleteBackup(ctx context.Context, kotsadmNamespace string, backupID string)
return errors.Wrap(err, "failed to create clientset")
}

veleroClient, err := k8sutil.GetVeleroKubeClient(ctx)
veleroClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return errors.Wrap(err, "failed to create velero client")
}
Expand Down Expand Up @@ -1125,7 +1125,7 @@ func GetBackupDetail(ctx context.Context, kotsadmNamespace string, backupName st
return nil, errors.Wrap(err, "failed to create clientset")
}

veleroClient, err := k8sutil.GetVeleroKubeClient(ctx)
veleroClient, err := k8sclient.GetBuilder().GetVeleroKubeClient(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to create velero client")
}
Expand Down
Loading

0 comments on commit 74ecee5

Please sign in to comment.