Skip to content

Commit 4b3f8c5

Browse files
committed
Attempt#1 at fixing tests
Signed-off-by: Parthvi Vala <[email protected]>
1 parent e4053da commit 4b3f8c5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

hosted/aks/p1/p1_provisioning_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ var _ = Describe("P1Provisioning", func() {
187187
initialNPCount := len(*cluster.AKSConfig.NodePools)
188188
cluster, err = helper.AddNodePool(cluster, 3, ctx.RancherAdminClient, false, false)
189189
Expect(err).To(BeNil())
190-
Expect(cluster.AKSConfig.NodePools).To(HaveLen(initialNPCount + 3))
190+
Expect(*cluster.AKSConfig.NodePools).To(HaveLen(initialNPCount + 3))
191191

192192
var upgradeK8sVersion string
193193
upgradeK8sVersion, err = helper.GetK8sVersion(ctx.RancherAdminClient, ctx.CloudCredID, location, false)
@@ -208,7 +208,7 @@ var _ = Describe("P1Provisioning", func() {
208208

209209
cluster, err = ctx.RancherAdminClient.Management.Cluster.ByID(cluster.ID)
210210
Expect(err).NotTo(HaveOccurred())
211-
Expect(cluster.AKSStatus.UpstreamSpec.NodePools).To(HaveLen(initialNPCount + 3))
211+
Expect(*cluster.AKSStatus.UpstreamSpec.NodePools).To(HaveLen(initialNPCount + 3))
212212
Expect(cluster.AKSStatus.UpstreamSpec.KubernetesVersion).To(Equal(upgradeK8sVersion))
213213
})
214214

hosted/aks/p1/p1_suite_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ func syncAddNodePoolFromAzureAndRancher(cluster *management.Cluster, client *ran
435435

436436
if !helpers.IsImport {
437437
// skip this check if the cluster is imported since the AKSConfig value will not be updated
438-
Expect(cluster.AKSConfig.NodePools).To(HaveLen(initialNPCount + 1))
438+
Expect(*cluster.AKSConfig.NodePools).To(HaveLen(initialNPCount + 1))
439439
}
440440
})
441441

@@ -661,7 +661,7 @@ func azureSyncCheck(cluster *management.Cluster, client *rancher.Client, upgrade
661661

662662
// Check AKSConfig if the cluster is Rancher-provisioned
663663
if !helpers.IsImport {
664-
Expect(cluster.AKSConfig.NodePools).To(HaveLen(currentNPCount + 1))
664+
Expect(*cluster.AKSConfig.NodePools).To(HaveLen(currentNPCount + 1))
665665
}
666666
})
667667

@@ -710,7 +710,7 @@ func azureSyncCheck(cluster *management.Cluster, client *rancher.Client, upgrade
710710

711711
// Check AKSConfig if the cluster is Rancher-provisioned
712712
if !helpers.IsImport {
713-
Expect(cluster.AKSConfig.NodePools).To(HaveLen(currentNPCount))
713+
Expect(*cluster.AKSConfig.NodePools).To(HaveLen(currentNPCount))
714714
}
715715
})
716716

hosted/eks/p1/p1_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,10 @@ func syncAWSToRancherCheck(cluster *management.Cluster, client *rancher.Client,
414414
return true
415415
}, "10m", "5s").Should(BeTrue(), "Timed out waiting for EKS nodegroup labels to be added")
416416

417-
configNodeGroups := *cluster.EKSConfig.NodeGroups
418417
upstreamNodeGroups = *cluster.EKSStatus.UpstreamSpec.NodeGroups
419418
for key, value := range addLabels {
420419
if !helpers.IsImport {
420+
configNodeGroups := *cluster.EKSConfig.NodeGroups
421421
Expect(*configNodeGroups[ngIndex].Labels).To(HaveKeyWithValue(key, value))
422422
}
423423
Expect(*upstreamNodeGroups[ngIndex].Labels).To(HaveKeyWithValue(key, value))

0 commit comments

Comments
 (0)