@@ -337,7 +337,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
337337 configCluster .ControlPlaneMachineCount = ptr.To [int64 ](1 )
338338 configCluster .WorkerMachineCount = ptr.To [int64 ](1 )
339339 configCluster .Flavor = shared .SSMFlavor
340- _ , md , _ := createCluster (ctx , configCluster , result )
340+ cluster , md , _ := createCluster (ctx , configCluster , result )
341341
342342 workerMachines := framework .GetMachinesByMachineDeployments (ctx , framework.GetMachinesByMachineDeploymentsInput {
343343 Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
@@ -359,6 +359,17 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
359359 Expect (err ).To (BeNil ())
360360 Expect (len (awsMachineTemplateList .Items )).To (BeNumerically (">" , 0 ), "Expected at least one AWSMachineTemplate" )
361361
362+ ginkgo .By (fmt .Sprintf ("Found %d AWSMachineTemplates" , len (awsMachineTemplateList .Items )))
363+ ginkgo .By (fmt .Sprintf ("Cluster: name=%s, namespace=%s, infrastructureRef=%v" ,
364+ cluster .Name , cluster .Namespace , cluster .Spec .InfrastructureRef ))
365+
366+ // Print each AWSMachineTemplate for debugging
367+ for i , template := range awsMachineTemplateList .Items {
368+ ginkgo .By (fmt .Sprintf ("AWSMachineTemplate[%d]: name=%s, instanceType=%s, labels=%v, ownerRefs=%v, capacity=%v" ,
369+ i , template .Name , template .Spec .Template .Spec .InstanceType ,
370+ template .Labels , template .OwnerReferences , template .Status .Capacity ))
371+ }
372+
362373 foundTemplateWithCapacity := false
363374 for _ , template := range awsMachineTemplateList .Items {
364375 if len (template .Status .Capacity ) > 0 {
0 commit comments