Skip to content

Commit

Permalink
test(loggin): enhance chainsaw test steps with descriptive names
Browse files Browse the repository at this point in the history
  • Loading branch information
lwpk110 committed Dec 10, 2024
1 parent 6ff693d commit 3da2805
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
9 changes: 7 additions & 2 deletions test/e2e/logging/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ metadata:
name: logging
spec:
steps:
- try:

- name: install aggregator
try:
- apply:
file: aggregator.yaml
- assert:
file: aggregator-assert.yaml
- try:
- name: install zookeeper
try:
- apply:
file: zk.yaml
- assert:
file: zk-assert.yaml
- assert:
file: zk-discovery-assert.yaml
- name: assert zk logs in aggregator
try:
- script:
env:
- name: NAMESPACE
Expand Down
27 changes: 21 additions & 6 deletions test/e2e/smoke/tls-override-pdb/test_tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,27 @@ echo "Start TLS testing..."
############################################################################
# Test the plaintext unsecured connection
############################################################################
if ! /kubedoop/zookeeper/bin/zkCli.sh -server "${SERVER}" ls / &> /dev/null;
then
echo "[ERROR] Could not establish unsecure connection!"
exit 1
fi
echo "[SUCCESS] Unsecure client connection established!"
# Initialize retry counter
retry_count=0
max_retries=2
retry_delay=5

# Try connection with retries
while [ $retry_count -le $max_retries ]; do
if /kubedoop/zookeeper/bin/zkCli.sh -server "${SERVER}" ls / &> /dev/null; then
echo "[SUCCESS] Unsecure client connection established!"
break
else
retry_count=$((retry_count + 1))
if [ $retry_count -le $max_retries ]; then
echo "[WARN] Could not establish unsecure connection! Retrying in ${retry_delay} seconds... (Attempt ${retry_count}/${max_retries})"
sleep $retry_delay
else
echo "[ERROR] Could not establish unsecure connection after ${max_retries} retries!"
exit 1
fi
fi
done

############################################################################
# We set the correct client tls credentials and expect to be able to connect
Expand Down

0 comments on commit 3da2805

Please sign in to comment.