From c8b40d19789e5be8cb4b9087114f763f9acf80e3 Mon Sep 17 00:00:00 2001 From: samuel Date: Thu, 6 Feb 2025 15:46:02 +0100 Subject: [PATCH] looks like a test that might need fixing --- controllers/solrcloud_controller_basic_auth_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/solrcloud_controller_basic_auth_test.go b/controllers/solrcloud_controller_basic_auth_test.go index c271393d..79387c96 100644 --- a/controllers/solrcloud_controller_basic_auth_test.go +++ b/controllers/solrcloud_controller_basic_auth_test.go @@ -351,12 +351,12 @@ func expectBasicAuthConfigOnPodTemplateWithGomega(g Gomega, solrCloud *solrv1bet func expectPutSecurityJsonInZkCmd(g Gomega, expInitContainer *corev1.Container) { g.Expect(expInitContainer).To(Not(BeNil()), "Didn't find the setup-zk InitContainer in the sts!") - expCmd := "solr zk cp zk:/security.json /tmp/current_security.json >/dev/null 2>&1; " + + expCmd := "solr zk cp zk:/security.json /tmp/current_security.json --zk-host $ZK_HOST >/dev/null 2>&1; " + "GET_CURRENT_SECURITY_JSON_EXIT_CODE=$?; if [ ${GET_CURRENT_SECURITY_JSON_EXIT_CODE} -eq 0 ]; then " + "if [ ! -s /tmp/current_security.json ] || grep -q '^{}$' /tmp/current_security.json ]; then " + - "echo $SECURITY_JSON > /tmp/security.json; solr zk cp /tmp/security.json zk:/security.json >/dev/null 2>&1; " + + "echo $SECURITY_JSON > /tmp/security.json; solr zk cp /tmp/security.json zk:/security.json --zk-host $ZK_HOST >/dev/null 2>&1; " + " echo 'Blank security.json found. Put new security.json in ZK'; fi; elif [ ${GET_CURRENT_SECURITY_JSON_EXIT_CODE} -eq 1 ]; then " + - " echo $SECURITY_JSON > /tmp/security.json; solr zk cp /tmp/security.json zk:/security.json >/dev/null 2>&1; " + + " echo $SECURITY_JSON > /tmp/security.json; solr zk cp /tmp/security.json zk:/security.json --zk-host $ZK_HOST >/dev/null 2>&1; " + " echo 'No security.json found. Put new security.json in ZK'; fi" g.Expect(expInitContainer.Command[2]).To(ContainSubstring(expCmd), "setup-zk initContainer not configured to bootstrap security.json!") }