Merge pull request #80859 from wojtek-t/fix_selflinks_in_tests

Fix selflinks in tests
This commit is contained in:
Kubernetes Prow Robot 2019-08-01 15:01:30 -07:00 committed by GitHub
commit 3287bf7a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -141,7 +141,7 @@ func (f *fakeJobControl) CreateJob(namespace string, job *batchv1.Job) (*batchv1
if f.Err != nil {
return nil, f.Err
}
job.SelfLink = fmt.Sprintf("/api/batch/v1/namespaces/%s/jobs/%s", namespace, job.Name)
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

@ -2439,7 +2439,7 @@ func TestDescribeEvents(t *testing.T) {
fake.NewSimpleClientset(&corev1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "bar",
SelfLink: "url/url/url/url",
SelfLink: "/api/v1/nodes/bar",
},
}, events),
},
@ -2447,7 +2447,7 @@ func TestDescribeEvents(t *testing.T) {
fake.NewSimpleClientset(&corev1.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{
Name: "bar",
SelfLink: "url/url/url/url",
SelfLink: "/api/v1/persistentvolumes/bar",
},
}, events),
},
@ -2456,7 +2456,7 @@ func TestDescribeEvents(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "bar",
Namespace: "foo",
SelfLink: "url/url/url/url",
SelfLink: "/api/v1/namespaces/foo/pods/bar",
},
}, events),
},

View File

@ -42,7 +42,7 @@ func TestEventCompatibility(t *testing.T) {
testPod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
SelfLink: "/api/version/pods/foo",
SelfLink: "/api/v1/namespaces/default/pods/foo",
Name: "foo",
Namespace: "default",
UID: "bar",