@@ -28,6 +28,7 @@ import (
2828
2929 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030 "k8s.io/apimachinery/pkg/util/rand"
31+ "k8s.io/utils/ptr"
3132
3233 "github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
3334
@@ -43,7 +44,7 @@ import (
4344)
4445
4546var _ = Describe ("Customer" , func () {
46- DescribeTable ("should upgrade a nodepool" ,
47+ DescribeTable ("should upgrade and update a nodepool" ,
4748 func (ctx context.Context , nodePoolMinor string , targetMinor string ) {
4849 // ARO-25490 (https://redhat.atlassian.net/browse/ARO-25490): remove after 2026-04-07 UTC or when fixed in CS.
4950 // Node pools on minor 4.21 fail during install (Azure marketplace image missing in CS).
@@ -197,10 +198,12 @@ var _ = Describe("Customer", func() {
197198 Expect (err ).NotTo (HaveOccurred ())
198199 Expect (previousReleaseImages ).NotTo (BeEmpty (), "expected node pool nodes to report at least one release image ref before upgrade" )
199200
200- By (fmt .Sprintf ("triggering nodepool upgrade to version %s" , nodePoolDesiredVersion ))
201+ By (fmt .Sprintf ("triggering nodepool upgrade to version %s and update replicas to 1" , nodePoolDesiredVersion ))
202+ updateReplicas := 3
201203 nodePoolsClient := tc .Get20240610ClientFactoryOrDie (ctx ).NewNodePoolsClient ()
202204 update := hcpsdk20240610preview.NodePoolUpdate {
203205 Properties : & hcpsdk20240610preview.NodePoolPropertiesUpdate {
206+ Replicas : ptr .To (int32 (updateReplicas )),
204207 Version : & hcpsdk20240610preview.NodePoolVersionProfile {
205208 ID : to .Ptr (nodePoolDesiredVersion ),
206209 ChannelGroup : to .Ptr (channelGroup ),
@@ -227,6 +230,11 @@ var _ = Describe("Customer", func() {
227230 Expect (npGetResponse .Properties .Version ).NotTo (BeNil ())
228231 Expect (npGetResponse .Properties .Version .ID ).NotTo (BeNil ())
229232 Expect (* npGetResponse .Properties .Version .ID ).To (Equal (nodePoolDesiredVersion ))
233+
234+ By ("verifiying node pool reflects correct node count" )
235+ Expect (verifiers .VerifyNodeCount (updateReplicas ).Verify (ctx , adminRESTConfig )).To (Succeed ())
236+ Expect (verifiers .VerifyNodesReady ().Verify (ctx , adminRESTConfig )).To (Succeed ())
237+
230238 },
231239 Entry ("from 4.20.z to 4.21.zLatest" ,
232240 labels .RequireNothing , labels .Critical , labels .Positive , labels .AroRpApiCompatible ,
0 commit comments