controller: vsphere: TestPatchMachine check Label map init
@@ -401,6 +401,9 @@ func TestPatchMachine(t *testing.T) {
{
name: "Test changing labels",
mutate: func(m *machinev1.Machine) {
+ if m.Labels == nil {
+ m.Labels = map[string]string{}
+ }
m.Labels["testlabel"] = "test"
},
expect: func(m *machinev1.Machine) error {
