Fix a panic during wwctl node list --ipmi for nodes with no ipmi configuration. #1847

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-04-01 16:48:43 -06:00
parent 965cef07c7
commit 51786b5e4a
3 changed files with 24 additions and 4 deletions

View File

@@ -187,6 +187,18 @@ nodes:
profiles:
- default
`,
},
{
name: "node list with no ipmi data",
args: []string{"--ipmi"},
wantErr: false,
stdout: `
NODE IPMI IPADDR IPMI PORT IPMI USERNAME IPMI INTERFACE
---- ----------- --------- ------------- --------------
n1 -- -- -- --`,
inDb: `
nodes:
n1: {}`,
},
{
name: "node list profile with ipmi user",