@@ -1409,22 +1409,19 @@ var _ = Describe("Fake client", func() {
14091409 })
14101410
14111411 It ("should not change the status of typed objects that have a status subresource on update" , func () {
1412- obj := & corev1.Node {
1412+ obj := & corev1.Pod {
14131413 ObjectMeta : metav1.ObjectMeta {
1414- Name : "node" ,
1415- },
1416- Status : corev1.NodeStatus {
1417- NodeInfo : corev1.NodeSystemInfo {MachineID : "machine-id" },
1414+ Name : "pod" ,
14181415 },
14191416 }
14201417 cl := NewClientBuilder ().WithStatusSubresource (obj ).WithObjects (obj ).Build ()
14211418
1422- obj .Status .NodeInfo . MachineID = "updated-machine-id "
1419+ obj .Status .Phase = "Running "
14231420 Expect (cl .Update (context .Background (), obj )).To (Succeed ())
14241421
14251422 Expect (cl .Get (context .Background (), client .ObjectKeyFromObject (obj ), obj )).To (Succeed ())
14261423
1427- Expect (obj .Status ).To (BeEquivalentTo (corev1.NodeStatus { NodeInfo : corev1. NodeSystemInfo { MachineID : "machine-id" } }))
1424+ Expect (obj .Status ).To (BeEquivalentTo (corev1.PodStatus { }))
14281425 })
14291426
14301427 It ("should return a conflict error when an incorrect RV is used on status update" , func () {
@@ -1511,25 +1508,20 @@ var _ = Describe("Fake client", func() {
15111508 })
15121509
15131510 It ("should not change the status of typed objects that have a status subresource on patch" , func () {
1514- obj := & corev1.Node {
1511+ obj := & corev1.Pod {
15151512 ObjectMeta : metav1.ObjectMeta {
15161513 Name : "node" ,
15171514 },
1518- Status : corev1.NodeStatus {
1519- NodeInfo : corev1.NodeSystemInfo {
1520- MachineID : "machine-id" ,
1521- },
1522- },
15231515 }
15241516 Expect (cl .Create (context .Background (), obj )).To (Succeed ())
15251517 original := obj .DeepCopy ()
15261518
1527- obj .Status .NodeInfo . MachineID = "machine-id-from-patch "
1519+ obj .Status .Phase = "Running "
15281520 Expect (cl .Patch (context .Background (), obj , client .MergeFrom (original ))).To (Succeed ())
15291521
15301522 Expect (cl .Get (context .Background (), client .ObjectKeyFromObject (obj ), obj )).To (Succeed ())
15311523
1532- Expect (obj .Status ).To (BeEquivalentTo (corev1.NodeStatus { NodeInfo : corev1. NodeSystemInfo { MachineID : "machine-id" } }))
1524+ Expect (obj .Status ).To (BeEquivalentTo (corev1.PodStatus { }))
15331525 })
15341526
15351527 It ("should not change non-status field of typed objects that have a status subresource on status patch" , func () {
0 commit comments