Skip to content

Commit 599eb74

Browse files
committed
updated TestNodePoolToRosaMachinePoolSpec unit test
1 parent 0f6777e commit 599eb74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

exp/controllers/rosamachinepool_controller_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55
"time"
66

7+
"github.com/google/go-cmp/cmp/cmpopts"
78
. "github.com/onsi/gomega"
89
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
910
"k8s.io/apimachinery/pkg/util/intstr"
@@ -28,7 +29,8 @@ func TestNodePoolToRosaMachinePoolSpec(t *testing.T) {
2829
},
2930
UpdateConfig: &expinfrav1.RosaUpdateConfig{
3031
RollingUpdate: &expinfrav1.RollingUpdate{
31-
MaxSurge: &intstr.IntOrString{IntVal: 3},
32+
MaxSurge: ptr.To(intstr.FromInt32(3)),
33+
MaxUnavailable: ptr.To(intstr.FromInt32(5)),
3234
},
3335
},
3436
}
@@ -44,5 +46,5 @@ func TestNodePoolToRosaMachinePoolSpec(t *testing.T) {
4446

4547
expectedSpec := nodePoolToRosaMachinePoolSpec(nodePoolSpec)
4648

47-
g.Expect(expectedSpec).To(Equal(rosaMachinePoolSpec))
49+
g.Expect(rosaMachinePoolSpec).To(BeComparableTo(expectedSpec, cmpopts.EquateEmpty()))
4850
}

0 commit comments

Comments
 (0)