From 9ebd4d1cebbe1c9141e3a6b54176fdea8a79dd91 Mon Sep 17 00:00:00 2001 From: Fanny Jiang Date: Mon, 30 Dec 2024 19:05:10 -0500 Subject: [PATCH] check empty instancesDescription.Reservations condition --- test/new-e2e/pkg/provisioners/aws/kubernetes/kubernetes_dump.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/new-e2e/pkg/provisioners/aws/kubernetes/kubernetes_dump.go b/test/new-e2e/pkg/provisioners/aws/kubernetes/kubernetes_dump.go index b786008af1d3b..1bbc64306b162 100644 --- a/test/new-e2e/pkg/provisioners/aws/kubernetes/kubernetes_dump.go +++ b/test/new-e2e/pkg/provisioners/aws/kubernetes/kubernetes_dump.go @@ -125,7 +125,7 @@ func dumpKindClusterState(ctx context.Context, name string) (ret string, err err } // instancesDescription.Reservations = [] - if instancesDescription == nil || (len(instancesDescription.Reservations) > 0 && len(instancesDescription.Reservations[0].Instances) != 1) { + if instancesDescription == nil || len(instancesDescription.Reservations) == 0 || (len(instancesDescription.Reservations) > 0 && len(instancesDescription.Reservations[0].Instances) != 1) { return ret, fmt.Errorf("did not find exactly one instance for cluster %s", name) }