Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selflinks in tests #80859

Merged
merged 1 commit into from Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controller/cronjob/injection.go
Expand Up @@ -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
Expand Down
Expand Up @@ -2439,15 +2439,15 @@ 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),
},
"PersistentVolumeDescriber": &PersistentVolumeDescriber{
fake.NewSimpleClientset(&corev1.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{
Name: "bar",
SelfLink: "url/url/url/url",
SelfLink: "/api/v1/persistentvolumes/bar",
},
}, events),
},
Expand All @@ -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),
},
Expand Down
2 changes: 1 addition & 1 deletion test/integration/events/events_test.go
Expand Up @@ -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",
Expand Down