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))
400
+
}
401
+
Expect(template.Status.NodeInfo.Architecture).ToNot(BeEmpty(), fmt.Sprintf("Expected architecture to be set in nodeInfo for template %s", template.Name))
402
+
Expect(string(template.Status.NodeInfo.Architecture)).To(MatchRegexp("^(amd64|arm64)$"), fmt.Sprintf("Expected architecture to be amd64 or arm64 for template %s", template.Name))
403
+
// Verify operating system is set (if available)
404
+
// Note: OperatingSystem may be empty when:
405
+
// 1. No explicit AMI ID is specified
406
+
// 2. Kubernetes version cannot be determined (MachineDeployment not yet created)
407
+
// 3. AMI lookup fails
408
+
// 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))
412
+
ginkgo.By(fmt.Sprintf("DEBUG: Template %s full status: %+v", template.Name, template.Status))
413
+
} else {
414
+
ginkgo.By(fmt.Sprintf("INFO: Template %s has OperatingSystem set to: %s", template.Name, template.Status.NodeInfo.OperatingSystem))
415
+
// If OperatingSystem is set, verify it's a valid value
416
+
Expect(string(template.Status.NodeInfo.OperatingSystem)).To(MatchRegexp("^(linux|windows)$"), fmt.Sprintf("Expected operatingSystem to be linux or windows for template %s", template.Name))
417
+
}
376
418
Expect(template.Status.NodeInfo.Architecture).ToNot(BeEmpty(), "Expected architecture to be set in nodeInfo")
377
419
Expect(string(template.Status.NodeInfo.Architecture)).To(MatchRegexp("^(amd64|arm64)$"), "Expected architecture to be amd64 or arm64")
0 commit comments