Skip to content

Commit

Permalink
updated TestNodePoolToRosaMachinePoolSpec unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
muraee committed Jun 13, 2024
1 parent 0f6777e commit 599eb74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exp/controllers/rosamachinepool_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"
"time"

"github.com/google/go-cmp/cmp/cmpopts"
. "github.com/onsi/gomega"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
Expand All @@ -28,7 +29,8 @@ func TestNodePoolToRosaMachinePoolSpec(t *testing.T) {
},
UpdateConfig: &expinfrav1.RosaUpdateConfig{
RollingUpdate: &expinfrav1.RollingUpdate{
MaxSurge: &intstr.IntOrString{IntVal: 3},
MaxSurge: ptr.To(intstr.FromInt32(3)),
MaxUnavailable: ptr.To(intstr.FromInt32(5)),
},
},
}
Expand All @@ -44,5 +46,5 @@ func TestNodePoolToRosaMachinePoolSpec(t *testing.T) {

expectedSpec := nodePoolToRosaMachinePoolSpec(nodePoolSpec)

g.Expect(expectedSpec).To(Equal(rosaMachinePoolSpec))
g.Expect(rosaMachinePoolSpec).To(BeComparableTo(expectedSpec, cmpopts.EquateEmpty()))
}

0 comments on commit 599eb74

Please sign in to comment.