File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ func nextLbActions(
464464
465465 // If the name of the lb is wrong, change it
466466 if desired .lb .Name != actual .lb .Name {
467- next = append (next , actions .RenameLb (actual .lb .UUID , actual .lb .Name ))
467+ next = append (next , actions .RenameLb (actual .lb .UUID , desired .lb .Name ))
468468 }
469469
470470 // All other changes are applied aggressively, as the customer would have
Original file line number Diff line number Diff line change @@ -397,16 +397,16 @@ func TestNextLbActions(t *testing.T) {
397397 // Rename lb if name changed. This is safe because the lbs have either
398398 // been acquired by name (in which case both will have the same name),
399399 // or by UUID through the service annotation.
400- one := & cloudscale.LoadBalancer {
400+ want := & cloudscale.LoadBalancer {
401401 Name : "foo" ,
402402 }
403- two := & cloudscale.LoadBalancer {
403+ have := & cloudscale.LoadBalancer {
404404 UUID : "2" ,
405405 Name : "bar" ,
406406 }
407- assertActions (& lbState {lb : one }, & lbState {lb : two }, []actions.Action {
408- actions .AwaitLb (two ),
409- actions .RenameLb ("2" , "bar " ),
407+ assertActions (& lbState {lb : want }, & lbState {lb : have }, []actions.Action {
408+ actions .AwaitLb (have ),
409+ actions .RenameLb ("2" , "foo " ),
410410 })
411411}
412412
You can’t perform that action at this time.
0 commit comments