Skip to content

Commit 66caaba

Browse files
committed
fix the e2e
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
1 parent d924671 commit 66caaba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/e2e/utils_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,15 @@ func checkIfAzurePropertyProviderIsWorking() {
312312
ignoreCostProperties := cmpopts.IgnoreMapEntries(func(k clusterv1beta1.PropertyName, v clusterv1beta1.PropertyValue) bool {
313313
return k == azure.PerCPUCoreCostProperty || k == azure.PerGBMemoryCostProperty
314314
})
315+
// we don't know the exact value of k8s version and cluster entry point
316+
ignoreClusterProperties := cmpopts.IgnoreMapEntries(func(k clusterv1beta1.PropertyName, v clusterv1beta1.PropertyValue) bool {
317+
return k == propertyprovider.K8sVersionProperty || k == propertyprovider.ClusterEntryPointProperty
318+
})
315319
if diff := cmp.Diff(
316320
mcObj.Status.Properties, wantStatus.Properties,
317321
ignoreTimeTypeFields,
318322
ignoreCostProperties,
323+
ignoreClusterProperties,
319324
); diff != "" {
320325
return fmt.Errorf("member cluster status properties diff (-got, +want):\n%s", diff)
321326
}
@@ -576,7 +581,7 @@ func cleanupInvalidClusters() {
576581
}
577582
Eventually(func() error {
578583
err := hubClient.Get(ctx, types.NamespacedName{Name: name}, mcObj)
579-
if err != nil {
584+
if err != nil && !k8serrors.IsNotFound(err) {
580585
return err
581586
}
582587
mcObj.Finalizers = []string{}

0 commit comments

Comments
 (0)