Add status.hostIPs in ConvertDownwardAPIFieldLabel

This commit is contained in:
Shiming Zhang
2022-04-27 16:06:16 +08:00
parent 7a81ef6406
commit c287943bdd
2 changed files with 15 additions and 0 deletions

View File

@@ -203,6 +203,20 @@ func TestConvertDownwardAPIFieldLabel(t *testing.T) {
expectedLabel: "status.podIPs",
expectedValue: "10.244.0.6",
},
{
version: "v1",
label: "status.hostIPs",
value: "10.244.0.6,fd00::6",
expectedLabel: "status.hostIPs",
expectedValue: "10.244.0.6,fd00::6",
},
{
version: "v1",
label: "status.hostIPs",
value: "10.244.0.6",
expectedLabel: "status.hostIPs",
expectedValue: "10.244.0.6",
},
}
for _, tc := range testCases {
label, value, err := ConvertDownwardAPIFieldLabel(tc.version, tc.label, tc.value)