mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #80859 from wojtek-t/fix_selflinks_in_tests
Fix selflinks in tests
This commit is contained in:
commit
3287bf7a3a
@ -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
|
||||
|
@ -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),
|
||||
},
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user