You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ginkgo.By(fmt.Sprintf("ERROR: Template %s has empty Architecture field in NodeInfo", template.Name))
399
+
}
400
+
Expect(template.Status.NodeInfo.Architecture).ToNot(BeEmpty(), fmt.Sprintf("Expected architecture to be set in nodeInfo for template %s", template.Name))
401
+
Expect(string(template.Status.NodeInfo.Architecture)).To(MatchRegexp("^(amd64|arm64)$"), fmt.Sprintf("Expected architecture to be amd64 or arm64 for template %s", template.Name))
402
+
// Verify operating system is set (if available)
403
+
// Note: OperatingSystem may be empty when:
404
+
// 1. No explicit AMI ID is specified
405
+
// 2. Kubernetes version cannot be determined (MachineDeployment not yet created)
406
+
// 3. AMI lookup fails
407
+
// In these cases, the controller falls back to instance type architecture only.
ginkgo.By(fmt.Sprintf("INFO: Template %s has empty OperatingSystem (this is acceptable in fallback scenarios)", template.Name))
411
+
ginkgo.By(fmt.Sprintf("DEBUG: Template %s full status: %+v", template.Name, template.Status))
412
+
} else {
413
+
ginkgo.By(fmt.Sprintf("INFO: Template %s has OperatingSystem set to: %s", template.Name, template.Status.NodeInfo.OperatingSystem))
414
+
// If OperatingSystem is set, verify it's a valid value
415
+
Expect(string(template.Status.NodeInfo.OperatingSystem)).To(MatchRegexp("^(linux|windows)$"), fmt.Sprintf("Expected operatingSystem to be linux or windows for template %s", template.Name))
416
+
}
417
+
} else {
418
+
ginkgo.By(fmt.Sprintf("WARNING: Template %s has NodeInfo == nil", template.Name))
419
+
}
420
+
}
421
+
Expect(foundTemplateWithCapacity).To(BeTrue(), "Expected at least one AWSMachineTemplate to have capacity populated")
422
+
Expect(foundTemplateWithNodeInfo).To(BeTrue(), "Expected at least one AWSMachineTemplate to have nodeInfo populated")
0 commit comments