From 8ef063a093bf765f6d746bf2671ce6a505976840 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Fri, 20 Dec 2024 11:39:45 +0100 Subject: [PATCH] Check ip addresses formatting Signed-off-by: Christian Goll --- internal/app/wwctl/node/list/main_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/internal/app/wwctl/node/list/main_test.go b/internal/app/wwctl/node/list/main_test.go index 428ca9af..18f4ff13 100644 --- a/internal/app/wwctl/node/list/main_test.go +++ b/internal/app/wwctl/node/list/main_test.go @@ -602,6 +602,29 @@ nodes: n02: profiles: - default +`, + }, + { + name: "single node list with network", + args: []string{"-a"}, + wantErr: false, + stdout: ` +NODE FIELD PROFILE VALUE +---- ----- ------- ----- +n01 Profiles -- default +n01 NetDevs[default].Hwaddr -- aa:bb:cc:dd:ee:ff +n01 NetDevs[default].Ipaddr -- 1.1.1.1 +`, + inDb: `nodeprofiles: + default: {} +nodes: + n01: + profiles: + - default + network devices: + default: + hwaddr: aa:bb:cc:dd:ee:ff + ipaddr: 1.1.1.1 `, }, }