From bd1d82d16f9bee0fb3499f8f4a69caa04cb67ea6 Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Wed, 25 Nov 2026 12:20:03 +0300 Subject: [PATCH] test(kafka): drop the grep over kafka-rd for the CA certificate names The bats file grepped the kafka ApplicationDefinition for the strings clients-ca-cert and cluster-ca-cert. It passes on a selector that names them in a comment, a wrong template or an exclude list, and it cannot tell whether Strimzi writes Secrets of those names at all. The kafka e2e suite now asserts that the deployed CA certificate Secrets of those names are tenant-visible and that none of the cluster's tenant-visible Secrets holds a private key. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin --- hack/check-kafka-rd-secrets.bats | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 hack/check-kafka-rd-secrets.bats diff --git a/hack/check-kafka-rd-secrets.bats b/hack/check-kafka-rd-secrets.bats deleted file mode 100644 index a5c74f9ad..000000000 --- a/hack/check-kafka-rd-secrets.bats +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bats -# Unit test: kafka-rd cozyrds must reference the Strimzi-generated -# clients-ca-cert secret (not the bare clients-ca name, which does not exist). - -load test_helper - -REPO_ROOT="$(cd "$(dirname "${BATS_TEST_FILENAME:-$0}")/.." && pwd)" -COZYRDS="$REPO_ROOT/packages/system/kafka-rd/cozyrds/kafka.yaml" - -@test "kafka-rd cozyrds references clients-ca-cert (Strimzi actual name)" { - grep -q "clients-ca-cert" "$COZYRDS" -} - -@test "kafka-rd cozyrds does not reference bare clients-ca (wrong name)" { - if grep -qP "clients-ca(?!-)" "$COZYRDS"; then - echo "Found bare 'clients-ca' reference (missing '-cert' suffix)" >&2 - exit 1 - fi -} - -@test "kafka-rd cozyrds references cluster-ca-cert (Strimzi actual name)" { - grep -q "cluster-ca-cert" "$COZYRDS" -} - -@test "kafka-rd cozyrds does not reference bare cluster-ca (wrong name)" { - if grep -qP "cluster-ca(?!-)" "$COZYRDS"; then - echo "Found bare 'cluster-ca' reference (missing '-cert' suffix)" >&2 - exit 1 - fi -}