Skip to content

Commit e0485c4

Browse files
committed
test(kubeclient): expect strategic zero-value deletion
Strategic patch encodes clearing an omitempty boolean as null, which restores the Kubernetes zero value. Signed-off-by: Ajay Mishra <ajmishra@nvidia.com>
1 parent f187032 commit e0485c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

commons/pkg/kubeclient/nodepatch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func TestNodeMergePatch_SpecChanges_ReturnsExpectedPatch(t *testing.T) {
332332
patch, err = NodeMergePatch(modified, original)
333333
require.NoError(t, err)
334334
assert.JSONEq(t,
335-
`{"metadata":{"resourceVersion":"1"},"spec":{"taints":null,"unschedulable":false}}`,
335+
`{"metadata":{"resourceVersion":"1"},"spec":{"taints":null,"unschedulable":null}}`,
336336
string(patch),
337337
)
338338
}

0 commit comments

Comments
 (0)