Skip to content

Commit ca5c56d

Browse files
authored
chore: fix monitoring test (#956)
* chore: fix monitoring test * simplify test
1 parent bbd0854 commit ca5c56d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/templates/kuttl/smoke/test_zookeeper.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ def check_monitoring(hosts):
6464
url = host + ":9505"
6565
response = try_get(url)
6666

67-
if response.ok:
68-
continue
69-
else:
67+
if not response.ok:
7068
print("Error for [" + url + "]: could not access monitoring")
7169
exit(-1)
7270

@@ -76,12 +74,9 @@ def check_monitoring(hosts):
7674

7775
if response.ok:
7876
# arbitrary metric was chosen to test if metrics are present in the response
79-
if "quorum_size" in response.text:
80-
continue
81-
else:
77+
if "quorum_size" not in response.text:
8278
print("Error for [" + url + "]: missing metrics")
8379
exit(-1)
84-
continue
8580
else:
8681
print("Error for [" + url + "]: could not access monitoring")
8782
exit(-1)

0 commit comments

Comments
 (0)