ceph: fix the wrong condition in the cluster health check

There are the following problems in the cluster health check.

- If the cluster is healthy: Unnecessary long time before exiting from
  the health check loop. The test succeeds thanks to the succeeding
  assertion by luck.
- If the cluster is unhealthy: Exit from the health check loop immediately.
  The test fails in the succeeding assertion by luck too.

It's a regression that is introduced in the following commit.
https://github.com/rook/rook/commit/c0c0dc4ed977a6b373b1884c5b76c9588f0be077

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
This commit is contained in:
Satoru Takeuchi committed 2020-05-27 05:20:24 +09:00
1 parent 1d61812f37
commit 206e45facd
1 file changed
+1 -1
+1 -1
View File
@@ -74,7 +74,7 @@ func checkIfRookClusterIsHealthy(s suite.Suite, testClient *clients.TestClient,
retryCount := 0
for retryCount < utils.RetryLoop {
healthy, err := clients.IsClusterHealthy(testClient, clusterNamespace)
if !healthy {
if healthy {
logger.Infof("cluster %s is healthy", clusterNamespace)
return
}