Remove selflink references in different testing-related files

This commit is contained in:
Wojciech Tyczyński
2022-01-13 11:33:26 +01:00
parent 8c6b910e68
commit 551790729f
14 changed files with 5 additions and 36 deletions

View File

@@ -18,7 +18,6 @@ package cronjob
import (
"context"
"fmt"
"sync"
batchv1 "k8s.io/api/batch/v1"
@@ -143,7 +142,6 @@ func (f *fakeJobControl) CreateJob(namespace string, job *batchv1.Job) (*batchv1
if f.CreateErr != nil {
return nil, f.CreateErr
}
job.SelfLink = fmt.Sprintf("/apis/batch/v1/namespaces/%s/jobs/%s", namespace, job.Name)
f.Jobs = append(f.Jobs, *job)
job.UID = "test-uid"
return job, nil

View File

@@ -43,7 +43,6 @@ func TestGetJobFromTemplate2(t *testing.T) {
Name: "mycronjob",
Namespace: "snazzycats",
UID: types.UID("1a2b3c"),
SelfLink: "/apis/batch/v1/namespaces/snazzycats/jobs/mycronjob",
},
Spec: batchv1.CronJobSpec{
Schedule: "* * * * ?",