From 8f00d3fd53cfdd8bcfcf7f95113cae31c983b9cd Mon Sep 17 00:00:00 2001 From: Phani Teja Marupaka Date: Sat, 21 Aug 2021 15:58:49 -0700 Subject: [PATCH] Add test for null value --- kyaml/order/syncorder_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/kyaml/order/syncorder_test.go b/kyaml/order/syncorder_test.go index 4244d503d..bd5c75f15 100644 --- a/kyaml/order/syncorder_test.go +++ b/kyaml/order/syncorder_test.go @@ -183,6 +183,27 @@ pipeline: configPath: setters.yaml - image: set-namespace:v0.1 configPath: ns.yaml +`, + }, + { + name: "sort fields with null value", + from: `apiVersion: v1 +kind: ConfigMap +metadata: + creationTimestamp: null + name: workspaces.app.terraform.io +`, + to: `apiVersion: v1 +kind: ConfigMap +metadata: + name: workspaces.app.terraform.io + creationTimestamp: null +`, + expected: `apiVersion: v1 +kind: ConfigMap +metadata: + creationTimestamp: null + name: workspaces.app.terraform.io `, }, {