From 2f3ee7bb2bd67d2f6f269b60fc82438224444ed2 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Fri, 17 May 2024 09:48:41 +0200 Subject: [PATCH] add npe protection when stopping cl cluster --- integration-tests/docker/test_env/cl_node_cluster.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integration-tests/docker/test_env/cl_node_cluster.go b/integration-tests/docker/test_env/cl_node_cluster.go index 679e5393811..9ab20ad824c 100644 --- a/integration-tests/docker/test_env/cl_node_cluster.go +++ b/integration-tests/docker/test_env/cl_node_cluster.go @@ -51,6 +51,9 @@ func (c *ClCluster) Stop() error { for i := 0; i < len(nodes); i++ { nodeIndex := i eg.Go(func() error { + if nodes[nodeIndex].Container == nil { + return fmt.Errorf("attempt to stop node %d failed, because Container was nil, this should not have happened", nodeIndex) + } err := nodes[nodeIndex].Container.Stop(context.Background(), &timeout) if err != nil { return err