Use Node literal in MergeNode, not EmptyNode()
EmptyNode populates empty sub-structs, which interferes with omitempty during serialization. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -430,8 +430,6 @@ func TestListMultipleFormats(t *testing.T) {
|
||||
stdout: `
|
||||
- profiles:
|
||||
- default
|
||||
kernel: {}
|
||||
ipmi: {}
|
||||
`,
|
||||
inDb: `
|
||||
nodeprofiles:
|
||||
@@ -459,24 +457,12 @@ nodes:
|
||||
"Ipxe": "",
|
||||
"RuntimeOverlay": null,
|
||||
"SystemOverlay": null,
|
||||
"Kernel": {},
|
||||
"Ipmi": {
|
||||
"UserName": "",
|
||||
"Password": "",
|
||||
"Ipaddr": "",
|
||||
"Gateway": "",
|
||||
"Netmask": "",
|
||||
"Port": "",
|
||||
"Interface": "",
|
||||
"EscapeChar": "",
|
||||
"Write": "",
|
||||
"Template": "",
|
||||
"Tags": {}
|
||||
},
|
||||
"Kernel": null,
|
||||
"Ipmi": null,
|
||||
"Init": "",
|
||||
"Root": "",
|
||||
"NetDevs": {},
|
||||
"Tags": {},
|
||||
"NetDevs": null,
|
||||
"Tags": null,
|
||||
"PrimaryNetDev": "",
|
||||
"Disks": null,
|
||||
"FileSystems": null,
|
||||
@@ -510,24 +496,12 @@ nodes:
|
||||
"Ipxe": "",
|
||||
"RuntimeOverlay": null,
|
||||
"SystemOverlay": null,
|
||||
"Kernel": {},
|
||||
"Ipmi": {
|
||||
"UserName": "",
|
||||
"Password": "",
|
||||
"Ipaddr": "",
|
||||
"Gateway": "",
|
||||
"Netmask": "",
|
||||
"Port": "",
|
||||
"Interface": "",
|
||||
"EscapeChar": "",
|
||||
"Write": "",
|
||||
"Template": "",
|
||||
"Tags": {}
|
||||
},
|
||||
"Kernel": null,
|
||||
"Ipmi": null,
|
||||
"Init": "",
|
||||
"Root": "",
|
||||
"NetDevs": {},
|
||||
"Tags": {},
|
||||
"NetDevs": null,
|
||||
"Tags": null,
|
||||
"PrimaryNetDev": "",
|
||||
"Disks": null,
|
||||
"FileSystems": null,
|
||||
@@ -545,24 +519,12 @@ nodes:
|
||||
"Ipxe": "",
|
||||
"RuntimeOverlay": null,
|
||||
"SystemOverlay": null,
|
||||
"Kernel": {},
|
||||
"Ipmi": {
|
||||
"UserName": "",
|
||||
"Password": "",
|
||||
"Ipaddr": "",
|
||||
"Gateway": "",
|
||||
"Netmask": "",
|
||||
"Port": "",
|
||||
"Interface": "",
|
||||
"EscapeChar": "",
|
||||
"Write": "",
|
||||
"Template": "",
|
||||
"Tags": {}
|
||||
},
|
||||
"Kernel": null,
|
||||
"Ipmi": null,
|
||||
"Init": "",
|
||||
"Root": "",
|
||||
"NetDevs": {},
|
||||
"Tags": {},
|
||||
"NetDevs": null,
|
||||
"Tags": null,
|
||||
"PrimaryNetDev": "",
|
||||
"Disks": null,
|
||||
"FileSystems": null,
|
||||
@@ -588,12 +550,8 @@ nodes:
|
||||
stdout: `
|
||||
- profiles:
|
||||
- default
|
||||
kernel: {}
|
||||
ipmi: {}
|
||||
- profiles:
|
||||
- default
|
||||
kernel: {}
|
||||
ipmi: {}
|
||||
`,
|
||||
inDb: `
|
||||
nodeprofiles:
|
||||
|
||||
Reference in New Issue
Block a user