mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 22:53:22 +00:00
Stop setting SelfLink in kube-apiserver.
This commit is contained in:
@@ -686,11 +686,16 @@ func TestApplyManagedFields(t *testing.T) {
|
||||
t.Fatalf("Failed to marshal object: %v", err)
|
||||
}
|
||||
|
||||
selfLink := ""
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(genericfeatures.RemoveSelfLink) {
|
||||
selfLink = `
|
||||
"selfLink": "` + accessor.GetSelfLink() + `",`
|
||||
}
|
||||
|
||||
expected := []byte(`{
|
||||
"metadata": {
|
||||
"name": "test-cm",
|
||||
"namespace": "default",
|
||||
"selfLink": "` + accessor.GetSelfLink() + `",
|
||||
"namespace": "default",` + selfLink + `
|
||||
"uid": "` + string(accessor.GetUID()) + `",
|
||||
"resourceVersion": "` + accessor.GetResourceVersion() + `",
|
||||
"creationTimestamp": "` + accessor.GetCreationTimestamp().UTC().Format(time.RFC3339) + `",
|
||||
|
Reference in New Issue
Block a user