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 <f@lex.la>
This commit is contained in:
Aleksei Sviridkin committed 2026-11-25 12:20:10 +03:00
1 parent 66c7ed42ed
commit bd1d82d16f
1 file changed
-30
-30
View File
@@ -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
}