@@ -251,8 +251,7 @@ func remediation(ctx context.Context, inputGetter func() RemediationInput) {
251251 ListMachines (ctx , bootstrapClient , client .InNamespace (input .Namespace ))
252252 ListNodes (ctx , targetClient )
253253
254- By ("Testing Metal3DataTemplate reference" )
255- Logf ("Creating a new Metal3DataTemplate" )
254+ By ("Creating a new Metal3DataTemplate" )
256255 m3dataTemplate := infrav1.Metal3DataTemplate {}
257256 m3dataTemplateName := fmt .Sprintf ("%s-workers-template" , input .ClusterName )
258257 newM3dataTemplateName := "test-new-m3dt"
@@ -264,7 +263,6 @@ func remediation(ctx context.Context, inputGetter func() RemediationInput) {
264263 newM3DataTemplate .Spec .MetaData = m3dataTemplate .Spec .MetaData
265264 newM3DataTemplate .Spec .NetworkData = m3dataTemplate .Spec .NetworkData
266265 newM3DataTemplate .Spec .ClusterName = input .ClusterName
267- newM3DataTemplate .Spec .TemplateReference = m3dataTemplateName
268266
269267 newM3DataTemplate .ObjectMeta .Name = newM3dataTemplateName
270268 newM3DataTemplate .ObjectMeta .Namespace = m3dataTemplate .Namespace
@@ -310,14 +308,6 @@ func remediation(ctx context.Context, inputGetter func() RemediationInput) {
310308 Intervals : input .E2EConfig .GetIntervals (input .SpecName , "wait-machine-remediation" ),
311309 })
312310
313- By ("Waiting for single Metal3Data to refer to the old template" )
314- Eventually (func (g Gomega ) {
315- datas := infrav1.Metal3DataList {}
316- g .Expect (bootstrapClient .List (ctx , & datas , client .InNamespace (input .Namespace ))).To (Succeed ())
317- filtered := filterM3DataByReference (datas .Items , m3dataTemplateName )
318- g .Expect (filtered ).To (HaveLen (1 ))
319- }, input .E2EConfig .GetIntervals (input .SpecName , "wait-deployment" )... ).Should (Succeed ())
320-
321311 ListMetal3Machines (ctx , bootstrapClient , client .InNamespace (input .Namespace ))
322312 ListMachines (ctx , bootstrapClient , client .InNamespace (input .Namespace ))
323313 ListNodes (ctx , targetClient )
@@ -416,15 +406,6 @@ func listVms(state vmState) []string {
416406 return lines [:i ]
417407}
418408
419- func filterM3DataByReference (datas []infrav1.Metal3Data , referenceName string ) (result []infrav1.Metal3Data ) {
420- for _ , data := range datas {
421- if data .Spec .TemplateReference == referenceName {
422- result = append (result , data )
423- }
424- }
425- return
426- }
427-
428409func waitForVmsState (vmNames []string , state vmState , _ string , interval ... interface {}) {
429410 Byf ("Waiting for VMs %v to become '%s'" , vmNames , state )
430411 Eventually (func () []string {
0 commit comments