Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/e2e/azure_clusterproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ func (acp *AzureClusterProxy) collectPodLogs(ctx context.Context, namespace stri
workload := acp.GetWorkloadCluster(ctx, namespace, name)
pods := &corev1.PodList{}

Expect(workload.GetClient().List(ctx, pods)).To(Succeed())
// Failing to collect pod logs should not cause the test to fail. The workload cluster
// API server may be unreachable during teardown (for example due to a transient Azure
// load balancer / DNS issue), and we should not turn an otherwise-successful spec into
// a failure during [AfterEach] log collection.
if err := workload.GetClient().List(ctx, pods); err != nil {
Logf("Failed to list pods for workload cluster %s/%s: %v", namespace, name, err)
return
}

var err error
var podDescribe string
Expand Down
Loading