Skip to content

Commit e7e095c

Browse files
committed
Fixed tests
1 parent 570649e commit e7e095c

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

internal/pkg/testutil/kube.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,14 @@ func getAnnotations(name string, autoReload bool, secretAutoReload bool, configm
9797
if configmapAutoReload {
9898
annotations[options.ConfigmapReloaderAutoAnnotation] = "true"
9999
}
100+
if secretproviderclass {
101+
annotations[options.SecretProviderClassReloaderAutoAnnotation] = "true"
102+
}
100103

101104
if !(len(annotations) > 0) {
102105
annotations = map[string]string{
103-
options.ConfigmapUpdateOnChangeAnnotation: name,
104-
options.SecretUpdateOnChangeAnnotation: name,
106+
options.ConfigmapUpdateOnChangeAnnotation: name,
107+
options.SecretUpdateOnChangeAnnotation: name,
105108
options.SecretProviderClassUpdateOnChangeAnnotation: name,
106109
}
107110
}
@@ -700,7 +703,7 @@ func GetSecret(namespace string, secretName string, data string) *v1.Secret {
700703

701704
func GetCronJob(namespace string, cronJobName string) *batchv1.CronJob {
702705
return &batchv1.CronJob{
703-
ObjectMeta: getObjectMeta(namespace, cronJobName, false, false, false, map[string]string{}),
706+
ObjectMeta: getObjectMeta(namespace, cronJobName, false, false, false, false, map[string]string{}),
704707
Spec: batchv1.CronJobSpec{
705708
Schedule: "*/5 * * * *", // Run every 5 minutes
706709
JobTemplate: batchv1.JobTemplateSpec{
@@ -717,7 +720,7 @@ func GetCronJob(namespace string, cronJobName string) *batchv1.CronJob {
717720

718721
func GetJob(namespace string, jobName string) *batchv1.Job {
719722
return &batchv1.Job{
720-
ObjectMeta: getObjectMeta(namespace, jobName, false, false, false, map[string]string{}),
723+
ObjectMeta: getObjectMeta(namespace, jobName, false, false, false, false, map[string]string{}),
721724
Spec: batchv1.JobSpec{
722725
Selector: &metav1.LabelSelector{
723726
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -729,7 +732,7 @@ func GetJob(namespace string, jobName string) *batchv1.Job {
729732

730733
func GetCronJobWithEnvVar(namespace string, cronJobName string) *batchv1.CronJob {
731734
return &batchv1.CronJob{
732-
ObjectMeta: getObjectMeta(namespace, cronJobName, true, false, false, map[string]string{}),
735+
ObjectMeta: getObjectMeta(namespace, cronJobName, true, false, false, false, map[string]string{}),
733736
Spec: batchv1.CronJobSpec{
734737
Schedule: "*/5 * * * *", // Run every 5 minutes
735738
JobTemplate: batchv1.JobTemplateSpec{
@@ -746,7 +749,7 @@ func GetCronJobWithEnvVar(namespace string, cronJobName string) *batchv1.CronJob
746749

747750
func GetJobWithEnvVar(namespace string, jobName string) *batchv1.Job {
748751
return &batchv1.Job{
749-
ObjectMeta: getObjectMeta(namespace, jobName, true, false, false, map[string]string{}),
752+
ObjectMeta: getObjectMeta(namespace, jobName, true, false, false, false, map[string]string{}),
750753
Spec: batchv1.JobSpec{
751754
Selector: &metav1.LabelSelector{
752755
MatchLabels: map[string]string{"secondLabel": "temp"},
@@ -1291,7 +1294,7 @@ func GetSHAfromEmptyData() string {
12911294
func GetRollout(namespace string, rolloutName string, annotations map[string]string) *argorolloutv1alpha1.Rollout {
12921295
replicaset := int32(1)
12931296
return &argorolloutv1alpha1.Rollout{
1294-
ObjectMeta: getObjectMeta(namespace, rolloutName, false, false, false, annotations),
1297+
ObjectMeta: getObjectMeta(namespace, rolloutName, false, false, false, false, annotations),
12951298
Spec: argorolloutv1alpha1.RolloutSpec{
12961299
Selector: &metav1.LabelSelector{
12971300
MatchLabels: map[string]string{"secondLabel": "temp"},

0 commit comments

Comments
 (0)