Add UT for maintenance's DeleteOldJobs function. (#9013)

Unify the k8s.io/api/batch/v1 import alias to bactchv1api.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
Xun Jiang/Bruce Jiang
2025-06-27 08:49:26 +08:00
committed by GitHub
parent b0b5cc4236
commit 5ebb055c57
7 changed files with 207 additions and 43 deletions

View File

@@ -71,9 +71,19 @@ type BackupRepoReconciler struct {
logFormat *logging.FormatFlag
}
func NewBackupRepoReconciler(namespace string, logger logrus.FieldLogger, client client.Client, repositoryManager repomanager.Manager,
maintenanceFrequency time.Duration, backupRepoConfig string, keepLatestMaintenanceJobs int, repoMaintenanceConfig string, maintenanceJobResources kube.PodResources,
logLevel logrus.Level, logFormat *logging.FormatFlag) *BackupRepoReconciler {
func NewBackupRepoReconciler(
namespace string,
logger logrus.FieldLogger,
client client.Client,
repositoryManager repomanager.Manager,
maintenanceFrequency time.Duration,
backupRepoConfig string,
keepLatestMaintenanceJobs int,
repoMaintenanceConfig string,
maintenanceJobResources kube.PodResources,
logLevel logrus.Level,
logFormat *logging.FormatFlag,
) *BackupRepoReconciler {
c := &BackupRepoReconciler{
client,
namespace,